[PATCH] arm64: spinlocks: Fix write starvation with rwlock

Jeremy Linton jeremy.linton at arm.com
Fri Sep 8 09:35:28 PDT 2017


Hi,

On 09/08/2017 11:22 AM, Peter Zijlstra wrote:
> On Fri, Sep 08, 2017 at 10:59:59AM -0500, Jeremy Linton wrote:
>>
>> This patch changes the rwlock behavior so that the writer
>> unconditionally flags the lock structure (given that its
>> not already flagged by another writer). This blocks further
>> readers from acquiring the lock. Once all the readers have
>> drained, the writer that successfully flagged the lock can
>> progress.
> 
> Recursive readers from IRQ context _should_ be allowed through,
> otherwise you'll have deadlocks on tasklist_lock.

Oh fun! Do you have a test case that triggers this?

Thanks,






More information about the linux-arm-kernel mailing list