On Tue, Nov 12, 2019 at 01:51:11PM -0800, Ralph Campbell wrote:
+static int dmirror_invalidate_range_start(struct mmu_notifier *mn,
const struct mmu_notifier_range *update)
+{
- struct dmirror *dmirror = container_of(mn, struct dmirror, notifier);
- if (mmu_notifier_range_blockable(update))
mutex_lock(&dmirror->mutex);
- else if (!mutex_trylock(&dmirror->mutex))
return -EAGAIN;
- dmirror_do_update(dmirror, update->start, update->end);
- mutex_unlock(&dmirror->mutex);
- return 0;
+}
Can we adopts this to Jasons new interval tree invalidate?
Well, it would mean registering for the whole process address space. I'll give it a try.
I'm not sure it makes much sense that this testing is essentially modeled after nouveau's usage which is very strange compared to the other drivers.
Jason