From: Thomas Gleixner <tglx@linutronix.de>
To: Jan Kara <jack@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Anna-Maria Gleixner <anna-maria@linutronix.de>,
Sebastian Siewior <bigeasy@linutronix.de>,
Theodore Tso <tytso@mit.edu>, Julia Cartwright <julia@ni.com>,
Jan Kara <jack@suse.com>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [patch 2/4] fs/buffer: Move BH_Uptodate_Lock locking into wrapper functions
Date: Thu, 1 Aug 2019 00:27:08 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1908010022180.1788@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190731144639.GG15806@quack2.suse.cz>
On Wed, 31 Jul 2019, Jan Kara wrote:
> On Tue 30-07-19 13:24:54, Thomas Gleixner wrote:
> > Bit spinlocks are problematic if PREEMPT_RT is enabled, because they
> > disable preemption, which is undesired for latency reasons and breaks when
> > regular spinlocks are taken within the bit_spinlock locked region because
> > regular spinlocks are converted to 'sleeping spinlocks' on RT. So RT
> > replaces the bit spinlocks with regular spinlocks to avoid this problem.
> >
> > To avoid ifdeffery at the source level, wrap all BH_Uptodate_Lock bitlock
> > operations with inline functions, so the spinlock substitution can be done
> > at one place.
> >
> > Using regular spinlocks can also be enabled for lock debugging purposes so
> > the lock operations become visible to lockdep.
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: "Theodore Ts'o" <tytso@mit.edu>
> > Cc: Matthew Wilcox <willy@infradead.org>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: linux-fsdevel@vger.kernel.org
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
>
> BTW, it should be possible to get rid of BH_Uptodate_Lock altogether using
> bio chaining (which was non-existent when this bh code was written) to make
> sure IO completion function gets called only once all bios used to fill in
> / write out the page are done. It would be also more efficient. But I guess
> that's an interesting cleanup project for some other time...
While 'possible cleanup' is something which triggers a certain nerve, that
particular project certainly goes beyond my basic understanding of that
whole fs/block conglomerate. I rather leave that to people who actually
have a clue. :)
Thanks,
tglx
next prev parent reply other threads:[~2019-07-31 22:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 11:24 [patch 0/4] fs: Substitute bit-spinlocks for PREEMPT_RT and debugging Thomas Gleixner
2019-07-30 11:24 ` [patch 1/4] locking/lockdep: Add Kconfig option for bit spinlocks Thomas Gleixner
2019-07-30 11:24 ` [patch 2/4] fs/buffer: Move BH_Uptodate_Lock locking into wrapper functions Thomas Gleixner
2019-07-31 14:46 ` Jan Kara
2019-07-31 22:27 ` Thomas Gleixner [this message]
2019-07-30 11:24 ` [patch 3/4] fs/buffer: Substitute BH_Uptodate_Lock for RT and bit spinlock debugging Thomas Gleixner
2019-07-31 14:47 ` Jan Kara
2019-07-30 11:24 ` [patch 4/4] fs: jbd/jbd2: Substitute BH locks for RT and lock debugging Thomas Gleixner
2019-07-31 15:48 ` Jan Kara
2019-07-31 19:40 ` Thomas Gleixner
2019-08-01 8:44 ` Jan Kara
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=alpine.DEB.2.21.1908010022180.1788@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=julia@ni.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).