All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Byungchul Park <byungchul.park@lge.com>,
	Byungchul Park <max.byungchul.park@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	david@fromorbit.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Amir Goldstein <amir73il@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	oleg@redhat.com, kernel-team@lge.com, daniel@ffwll.ch
Subject: Re: About the try to remove cross-release feature entirely by Ingo
Date: Fri, 5 Jan 2018 12:05:06 -0500	[thread overview]
Message-ID: <20180105170506.GB4032@fieldses.org> (raw)
In-Reply-To: <20180105164941.GA4032@fieldses.org>

On Fri, Jan 05, 2018 at 11:49:41AM -0500, bfields wrote:
> On Mon, Jan 01, 2018 at 02:18:55AM -0800, Matthew Wilcox wrote:
> > On Sat, Dec 30, 2017 at 06:00:57PM -0500, Theodore Ts'o wrote:
> > > On Sat, Dec 30, 2017 at 05:40:28PM -0500, Theodore Ts'o wrote:
> > > > On Sat, Dec 30, 2017 at 12:44:17PM -0800, Matthew Wilcox wrote:
> > > > > 
> > > > > I'm not sure I agree with this part.  What if we add a new TCP lock class
> > > > > for connections which are used for filesystems/network block devices/...?
> > > > > Yes, it'll be up to each user to set the lockdep classification correctly,
> > > > > but that's a relatively small number of places to add annotations,
> > > > > and I don't see why it wouldn't work.
> > > > 
> > > > I was exagerrating a bit for effect, I admit.  (but only a bit).
> > 
> > I feel like there's been rather too much of that recently.  Can we stick
> > to facts as far as possible, please?
> > 
> > > > It can probably be for all TCP connections that are used by kernel
> > > > code (as opposed to userspace-only TCP connections).  But it would
> > > > probably have to be each and every device-mapper instance, each and
> > > > every block device, each and every mounted file system, each and every
> > > > bdi object, etc.
> > > 
> > > Clarification: all TCP connections that are used by kernel code would
> > > need to be in their own separate lock class.  All TCP connections used
> > > only by userspace could be in their own shared lock class.  You can't
> > > use a one lock class for all kernel-used TCP connections, because of
> > > the Network Block Device mounted on a local file system which is then
> > > exported via NFS and squirted out yet another TCP connection problem.
> > 
> > So the false positive you're concerned about is write-comes-in-over-NFS
> > (with socket lock held), NFS sends a write request to local filesystem,
> 
> I'm confused, what lock does Ted think the NFS server is holding over
> NFS processing?

Sorry, I meant "over RPC processing".

I'll confess to no understanding of socket locking.  The server RPC code
doesn't take any itself except in a couple places on setup and tear
down of a connection.  We wouldn't actually want any exclusive
per-connection lock held across RPC processing because we want to be
able to handle multiple concurrent RPCs per connection.

We do need a little locking just to make sure multiple server threads
replying to the same client don't accidentally corrupt their replies by
interleaving.  But even there we're using our own lock, held only while
transmitting the reply (after all the work's done and reply encoded).

--b.

WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Byungchul Park <byungchul.park@lge.com>,
	Byungchul Park <max.byungchul.park@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	david@fromorbit.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Amir Goldstein <amir73il@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	oleg@redhat.com, kernel-team@lge.com, daniel@ffwll.ch
Subject: Re: About the try to remove cross-release feature entirely by Ingo
Date: Fri, 5 Jan 2018 12:05:06 -0500	[thread overview]
Message-ID: <20180105170506.GB4032@fieldses.org> (raw)
In-Reply-To: <20180105164941.GA4032@fieldses.org>

On Fri, Jan 05, 2018 at 11:49:41AM -0500, bfields wrote:
> On Mon, Jan 01, 2018 at 02:18:55AM -0800, Matthew Wilcox wrote:
> > On Sat, Dec 30, 2017 at 06:00:57PM -0500, Theodore Ts'o wrote:
> > > On Sat, Dec 30, 2017 at 05:40:28PM -0500, Theodore Ts'o wrote:
> > > > On Sat, Dec 30, 2017 at 12:44:17PM -0800, Matthew Wilcox wrote:
> > > > > 
> > > > > I'm not sure I agree with this part.  What if we add a new TCP lock class
> > > > > for connections which are used for filesystems/network block devices/...?
> > > > > Yes, it'll be up to each user to set the lockdep classification correctly,
> > > > > but that's a relatively small number of places to add annotations,
> > > > > and I don't see why it wouldn't work.
> > > > 
> > > > I was exagerrating a bit for effect, I admit.  (but only a bit).
> > 
> > I feel like there's been rather too much of that recently.  Can we stick
> > to facts as far as possible, please?
> > 
> > > > It can probably be for all TCP connections that are used by kernel
> > > > code (as opposed to userspace-only TCP connections).  But it would
> > > > probably have to be each and every device-mapper instance, each and
> > > > every block device, each and every mounted file system, each and every
> > > > bdi object, etc.
> > > 
> > > Clarification: all TCP connections that are used by kernel code would
> > > need to be in their own separate lock class.  All TCP connections used
> > > only by userspace could be in their own shared lock class.  You can't
> > > use a one lock class for all kernel-used TCP connections, because of
> > > the Network Block Device mounted on a local file system which is then
> > > exported via NFS and squirted out yet another TCP connection problem.
> > 
> > So the false positive you're concerned about is write-comes-in-over-NFS
> > (with socket lock held), NFS sends a write request to local filesystem,
> 
> I'm confused, what lock does Ted think the NFS server is holding over
> NFS processing?

Sorry, I meant "over RPC processing".

I'll confess to no understanding of socket locking.  The server RPC code
doesn't take any itself except in a couple places on setup and tear
down of a connection.  We wouldn't actually want any exclusive
per-connection lock held across RPC processing because we want to be
able to handle multiple concurrent RPCs per connection.

We do need a little locking just to make sure multiple server threads
replying to the same client don't accidentally corrupt their replies by
interleaving.  But even there we're using our own lock, held only while
transmitting the reply (after all the work's done and reply encoded).

--b.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-01-05 17:05 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  6:24 About the try to remove cross-release feature entirely by Ingo Byungchul Park
2017-12-13  6:24 ` Byungchul Park
2017-12-13  7:13 ` Byungchul Park
2017-12-13  7:13   ` Byungchul Park
2017-12-13 15:23   ` Bart Van Assche
2017-12-13 15:23     ` Bart Van Assche
2017-12-14  3:07   ` Theodore Ts'o
2017-12-14  3:07     ` Theodore Ts'o
2017-12-14  5:58     ` Byungchul Park
2017-12-14  5:58       ` Byungchul Park
2017-12-14 11:18     ` Peter Zijlstra
2017-12-14 11:18       ` Peter Zijlstra
2017-12-14 13:30       ` Byungchul Park
2017-12-14 13:30         ` Byungchul Park
2017-12-13 10:46 ` [PATCH] locking/lockdep: Remove the cross-release locking checks Ingo Molnar
2017-12-13 10:46   ` Ingo Molnar
2017-12-13 10:46   ` Ingo Molnar
2017-12-14  5:01   ` Byungchul Park
2017-12-14  5:01     ` Byungchul Park
2017-12-15  4:05     ` Byungchul Park
2017-12-15  4:05       ` Byungchul Park
2017-12-15  6:24       ` Theodore Ts'o
2017-12-15  6:24         ` Theodore Ts'o
2017-12-15  7:38         ` Byungchul Park
2017-12-15  7:38           ` Byungchul Park
2017-12-15  8:39         ` Byungchul Park
2017-12-15  8:39           ` Byungchul Park
2017-12-15 21:15           ` Theodore Ts'o
2017-12-15 21:15             ` Theodore Ts'o
2017-12-16  2:41             ` Byungchul Park
2017-12-16  2:41               ` Byungchul Park
2017-12-29  1:47 ` About the try to remove cross-release feature entirely by Ingo Byungchul Park
2017-12-29  1:47   ` Byungchul Park
2017-12-29  2:02   ` Byungchul Park
2017-12-29  2:02     ` Byungchul Park
2017-12-29  3:51   ` Theodore Ts'o
2017-12-29  3:51     ` Theodore Ts'o
2017-12-29  7:28     ` Byungchul Park
2017-12-29  7:28       ` Byungchul Park
2017-12-30  6:16       ` Matthew Wilcox
2017-12-30  6:16         ` Matthew Wilcox
2017-12-30 15:40         ` Theodore Ts'o
2017-12-30 15:40           ` Theodore Ts'o
2017-12-30 20:44           ` Matthew Wilcox
2017-12-30 20:44             ` Matthew Wilcox
2017-12-30 22:40             ` Theodore Ts'o
2017-12-30 22:40               ` Theodore Ts'o
2017-12-30 23:00               ` Theodore Ts'o
2017-12-30 23:00                 ` Theodore Ts'o
2018-01-01 10:18                 ` Matthew Wilcox
2018-01-01 10:18                   ` Matthew Wilcox
2018-01-01 16:00                   ` Theodore Ts'o
2018-01-01 16:00                     ` Theodore Ts'o
2018-01-03  2:38                     ` Byungchul Park
2018-01-03  2:38                       ` Byungchul Park
2018-01-03  2:28                   ` Byungchul Park
2018-01-03  2:28                     ` Byungchul Park
2018-01-03  2:58                     ` Dave Chinner
2018-01-03  2:58                       ` Dave Chinner
2018-01-03  5:48                       ` Byungchul Park
2018-01-03  5:48                         ` Byungchul Park
2018-01-05 16:49                   ` J. Bruce Fields
2018-01-05 16:49                     ` J. Bruce Fields
2018-01-05 17:05                     ` J. Bruce Fields [this message]
2018-01-05 17:05                       ` J. Bruce Fields
2018-01-03  2:10               ` Byungchul Park
2018-01-03  2:10                 ` Byungchul Park
2018-01-03  7:05                 ` Theodore Ts'o
2018-01-03  7:05                   ` Theodore Ts'o
2018-01-03  8:10                   ` Byungchul Park
2018-01-03  8:10                     ` Byungchul Park
2018-01-03  8:23                     ` Byungchul Park
2018-01-03  8:23                       ` Byungchul Park
2018-01-03  8:23                       ` Byungchul Park
2018-01-03  1:57           ` Byungchul Park
2018-01-03  1:57             ` Byungchul Park
2018-01-02  7:57         ` Byungchul Park
2018-01-02  7:57           ` Byungchul Park
2017-12-29  8:09   ` Amir Goldstein
2017-12-29  8:09     ` Amir Goldstein
2017-12-29  9:46     ` Byungchul Park
2017-12-29  9:46       ` Byungchul Park

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=20180105170506.GB4032@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=amir73il@gmail.com \
    --cc=byungchul.park@lge.com \
    --cc=daniel@ffwll.ch \
    --cc=david@fromorbit.com \
    --cc=kernel-team@lge.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=max.byungchul.park@gmail.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.