Re: [RFC PATCH 4/4] Fix: sched/membarrier: p->mm->membarrier_state racy load (v2)

From: Mathieu Desnoyers
Date: Thu Sep 19 2019 - 13:33:15 EST


----- On Sep 19, 2019, at 12:26 PM, Will Deacon will@xxxxxxxxxx wrote:

[...]
>>
>> The current wording from membarrier(2) is:
>>
>> The "expedited" commands complete faster than the non-expedited
>> ones; they never block, but have the downside of causing extra
>> overhead.
>>
>> We could simply remove the "; they never block" part then ?
>
> I think so, yes. That or, "; they do not voluntarily block" or something
> like that. Maybe look at other man pages for inspiration ;)

OK, let's tackle the man-pages part after the fix reaches mainline though.

[...]
>
> I reckon you'll be fine using GFP_KERNEL and returning -ENOMEM on allocation
> failure. This shouldn't happen in practice and it removes the fallback
> path.

Works for me! I'll prepare an updated patchset.

Thanks,

Mathieu


--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com