Re: [GIT PULL] Please pull NFS client changes for 4.18
From: Linus Torvalds
Date: Tue Jun 12 2018 - 14:06:59 EST
On Tue, Jun 12, 2018 at 10:42 AM Linus Torvalds
> 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
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?