Re: [PATCH V5 0/9] Fixes for vhost metadata acceleration

Jason Wang
2019-08-15T03:26:56Z

On 2019/8/13 下午7:57, Jason Gunthorpe wrote:
> On Tue, Aug 13, 2019 at 04:31:07PM +0800, Jason Wang wrote:
>
>> What kind of issues do you see? Spinlock is to synchronize GUP with MMU
>> notifier in this series.
> A GUP that can't sleep can't pagefault which makes it a really weird
> pattern

My understanding is __get_user_pages_fast() assumes caller can fail or
have fallback. And we have graceful fallback to copy_{to|from}_user().

>
>> Btw, back to the original question. May I know why synchronize_rcu() is not
>> suitable? Consider:
> We already went over this. You'd need to determine it doesn't somehow
> deadlock the mm on reclaim paths. Maybe it is OK, the rcq_gq_wq is
> marked WQ_MEM_RECLAIM at least..

Yes, will take a look at this.

>
> I also think Michael was concerned about the latency spikes a long RCU
> delay would cause.

I don't think it's a real problem consider MMU notifier could be
preempted or blocked.

Thanks

>
> Jason