[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200617112719.GI2531@hirez.programming.kicks-ass.net>
Date: Wed, 17 Jun 2020 13:27:19 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: John Ogness <john.ogness@...utronix.de>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Thomas Gleixner <tglx@...utronix.de>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/1] fs/namespace.c: use spinlock instead of busy loop
On Wed, Jun 17, 2020 at 12:46:58PM +0206, John Ogness wrote:
> The MNT_WRITE_HOLD flag is used to manually implement a per-cpu
> optimized rwsem using busy waiting. This implementation is a problem
> on PREEMPT_RT because write_seqlock() on @mount_lock (i.e. taking a
> spinlock) does not disable preemption. This allows a writer to
> preempt a task that has set MNT_WRITE_HOLD and thus that writer will
> live lock in __mnt_want_write() due to busy looping with preemption
> disabled.
>
Why can't you use a regular percpu-rwsem for this?
Powered by blists - more mailing lists