[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFw+2+xCRAaMo8qgvZ7qNgRMo6D=WkwP7APQndG-y5b3dw@mail.gmail.com>
Date: Tue, 12 Jun 2018 11:06:40 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: trondmy@...merspace.com, NeilBrown <neilb@...e.com>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>
Subject: Re: [GIT PULL] Please pull NFS client changes for 4.18
On Tue, Jun 12, 2018 at 10:42 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> So could we please have a cursor entry for RCU walking, and actually
> have a agreed-upon way to do this? Maybe even using the low bit in the
> "next" field to mark a cursor entry generically - the same way we
> already do for the HEAD field in the bit-locked lists, just on the
> actual entries _on_ the list instead.
The real problem with a RCU cursor is that the lifetime of the cursor
is also RCU extended, so you can't do the traditional "just allocate
the cursor entry on the stack" that you can with synchronous locked
lists.
That makes it slightly more inconvenient to do simple cursors.
The dcache code has a fairly clean "dcache cursor", but it does use a
whole "struct dentry" for it (and it depends on "next_positive()" to
just skip them because dursors are never _positive_ dentries, so
there's some subtlety there).
But at least it's a very explicit cursor model, not that odd
delegation inode that seems to have a life as a real inode too.
So maybe a generic rcu-list cursor is too hard to do sanely, but can
we at least encourage that very explicit cursor model that is *only* a
cursor, and might not be touched/moved/reallocated by something else?
Linus
Powered by blists - more mailing lists