[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180515113303.GB14527@redhat.com>
Date: Tue, 15 May 2018 13:33:03 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Jan Kara <jack@...e.cz>
Cc: Peter Zijlstra <peterz@...radead.org>,
Waiman Long <longman@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Davidlohr Bueso <dave@...olabs.net>,
"Theodore Y. Ts'o" <tytso@....edu>,
Amir Goldstein <amir73il@...il.com>
Subject: Re: [RFC PATCH v2 2/2] locking/percpu-rwsem: Mark rwsem as
non-spinnable in percpu_rwsem_release()
On 05/15, Jan Kara wrote:
>
> Now this behavior upsets lockdep and that's why we fool it by telling the
> semaphore got released before returning to userspace (through
> percpu_rwsem_release() helper) and similarly we tell lockdep we've got the
> semaphore when an unfreeze syscall is called by percpu_rwsem_acquire(). Now
> Amir has discovered that also rwsem debugging code gets confused by this
> behavior
Yes, plus someone else has already reported the problem a month ago,
> and previously also someone noticed that rwsem spinning does not
> make sense and can be broken by this behavior.
Well, this doesn't really matter but again, freeze_super() checks
frozen == SB_UNFROZEN under sb->s_umount and only then does sb_wait_write(),
when the previous writer has already realeased this lock. So the new writer
will never spin after lockdep_sb_freeze_release() clears ->owner.
Oleg.
Powered by blists - more mailing lists