search for: mmu_interval_notifier_update

Displaying 6 results from an estimated 6 matches for "mmu_interval_notifier_update".

2020 Jan 13
0
[PATCH v6 3/6] mm/notifier: add mmu_interval_notifier_update()
...updated_last; }; #ifdef CONFIG_MMU_NOTIFIER @@ -310,6 +312,8 @@ int mmu_interval_notifier_insert_safe( const struct mmu_interval_notifier_ops *ops); void mmu_interval_notifier_remove(struct mmu_interval_notifier *mni); void mmu_interval_notifier_put(struct mmu_interval_notifier *mni); +void mmu_interval_notifier_update(struct mmu_interval_notifier *mni, + unsigned long start, unsigned long last); /** * mmu_interval_set_seq - Save the invalidation sequence diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 40c837ae8d90..47ad9cc89aab 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -157,7 +...
2020 Jan 14
2
[PATCH v6 4/6] mm/mmu_notifier: add mmu_interval_notifier_find()
On Mon, Jan 13, 2020 at 02:47:01PM -0800, Ralph Campbell wrote: > diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c > index 47ad9cc89aab..4efecc0f13cb 100644 > +++ b/mm/mmu_notifier.c > @@ -1171,6 +1171,39 @@ void mmu_interval_notifier_update(struct mmu_interval_notifier *mni, > } > EXPORT_SYMBOL_GPL(mmu_interval_notifier_update); > > +struct mmu_interval_notifier *mmu_interval_notifier_find(struct mm_struct *mm, > + const struct mmu_interval_notifier_ops *ops, > + unsigned long start, unsigned long last) &gt...
2020 Jan 13
0
[PATCH v6 4/6] mm/mmu_notifier: add mmu_interval_notifier_find()
...ude/linux/mmu_notifier.h index 0ce59b4f22c2..cdbbad13b278 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -314,6 +314,21 @@ void mmu_interval_notifier_remove(struct mmu_interval_notifier *mni); void mmu_interval_notifier_put(struct mmu_interval_notifier *mni); void mmu_interval_notifier_update(struct mmu_interval_notifier *mni, unsigned long start, unsigned long last); +struct mmu_interval_notifier *mmu_interval_notifier_find(struct mm_struct *mm, + const struct mmu_interval_notifier_ops *ops, + unsigned long start, unsigned long last); + +static inline unsigned long mmu_int...
2020 Jan 15
0
[PATCH v6 4/6] mm/mmu_notifier: add mmu_interval_notifier_find()
On 1/14/20 4:49 AM, Jason Gunthorpe wrote: > On Mon, Jan 13, 2020 at 02:47:01PM -0800, Ralph Campbell wrote: >> diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c >> index 47ad9cc89aab..4efecc0f13cb 100644 >> +++ b/mm/mmu_notifier.c >> @@ -1171,6 +1171,39 @@ void mmu_interval_notifier_update(struct mmu_interval_notifier *mni, >> } >> EXPORT_SYMBOL_GPL(mmu_interval_notifier_update); >> >> +struct mmu_interval_notifier *mmu_interval_notifier_find(struct mm_struct *mm, >> + const struct mmu_interval_notifier_ops *ops, >> + unsigned long sta...
2020 Jan 13
9
[PATCH v6 0/6] mm/hmm/test: add self tests for HMM
...tests to use the new core interval notifier API Changes v1 -> v4: https://lore.kernel.org/linux-mm/20191104222141.5173-1-rcampbell at nvidia.com Ralph Campbell (6): mm/mmu_notifier: add mmu_interval_notifier_insert_safe() mm/mmu_notifier: add mmu_interval_notifier_put() mm/notifier: add mmu_interval_notifier_update() mm/mmu_notifier: add mmu_interval_notifier_find() nouveau: use new mmu interval notifiers mm/hmm/test: add self tests for HMM MAINTAINERS | 3 + drivers/gpu/drm/nouveau/nouveau_svm.c | 313 ++++-- include/linux/mmu_notifier.h | 29 + lib/Kconfig...
2020 Jan 13
0
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
...; + unsigned long start = mmu_interval_notifier_start(mni); + unsigned long last = mmu_interval_notifier_last(mni); + + if (start >= range->start) { + /* Remove the whole interval or keep the right-hand part. */ + if (last <= range->end) + mmu_interval_notifier_put(mni); + else + mmu_interval_notifier_update(mni, range->end, last); + return; + } + + /* Keep the left-hand part of the interval. */ + mmu_interval_notifier_update(mni, start, range->start - 1); + + /* If a hole is created, create an interval for the right-hand part. */ + if (last >= range->end) { + smi = nouveau_svmm_new_inter...