public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Waiman Long <longman@redhat.com>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>
Subject: Re: REGRESSION/TEST FAILURE caused by DEBUG_RWSEMS
Date: Thu, 5 Apr 2018 07:40:33 +1000	[thread overview]
Message-ID: <20180404214033.GB23861@dastard> (raw)
In-Reply-To: <5670badd-0268-8a06-6612-b58eb6a304b6@redhat.com>

On Wed, Apr 04, 2018 at 09:55:18AM -0400, Waiman Long wrote:
> On 04/04/2018 09:23 AM, Theodore Y. Ts'o wrote:
> > The commit 5149cbac4235: "locking/rwsem: Add DEBUG_RWSEMS to look for
> > lock/unlock emismatches" (newly added in this merge window) will cause
> > xfstests tests failures in generic/068 for all file systems.
> >
> > This is because the freeze and thaw ioctls, by design, are run in
> > different processes.  It looks like the concern for why
> > CONFIG_DEBUG_RWSEMS was added is because read/write semaphores can
> > spin --- which if the case, we need to make sure that (a) the spinlock
> > code path is not used for the freeze/thaw ioctls, and (b) we don't
> > trigger the debug WARN_ON.
> >
> > Cheers,
> >
> The rwsem code has an up_read_non_owner() function for this kind of
> cross task lock/unlock.  I think we should add the corresponding
> up_write_non_owner() for that.

Keep in mind this is a percpu_rwsem, not a rwsem. It's the
sb_freeze_unlock() call in thaw_super() that is triggering it, and
it would appear that percpu_rwsems have no concept on "non_owner"
operation ATM.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2018-04-04 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 13:23 REGRESSION/TEST FAILURE caused by DEBUG_RWSEMS Theodore Y. Ts'o
2018-04-04 13:55 ` Waiman Long
2018-04-04 21:40   ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180404214033.GB23861@dastard \
    --to=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox