From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Nick Piggin <npiggin@kernel.dk>
Subject: Re: [patch 1/5] seqlock: Remove unused functions
Date: Thu, 15 Mar 2012 17:39:37 +0000 [thread overview]
Message-ID: <20120315173937.GC8943@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFzCQEiV2ZfB3s983fe-zpyFhhc+QvpA58qeLWJxRJtU0A@mail.gmail.com>
On Thu, Mar 15, 2012 at 09:29:50AM -0700, Linus Torvalds wrote:
> So I have to say, I hate this entire series.
>
> Seriously, what the heck is the point of this churn? It's all entirely
> pointless searc-and-replace as far as I can tell, with absolutely zero
> upside.
>
> It makes the low-level filesystems have to be aware of things that
> they don't want to know and *shouldn't* know. Why should a filesystem
> care that d_lock is a seqlock, and have to use a locking function that
> they've never seen before and is very specialized?
>
> The "seq" part of the dentry is something only the lookup code and the
> internal dentry code should care about. NOBODY ELSE should ever care.
*nod*
There's another issue I have with that on API level, leaving aside any
questions of that being a good fit for dcache. It's simply a bad interface:
we have variants that lock and play with d_seq, variants that play with
d_seq alone and, most commonly used, variant that locks but does not
touch d_seq at all. IOW, we have traded "writes to d_seq must be under
d_lock" with "update-seq-without-locking primitive must be used after we'd
used lock-without-touching-seq one". Which is not an improvement at all.
Sure, you can make a direct product out of anything; that doesn't make
the result a natural object.
The _only_ relationship between d_seq and d_lock is that the latter happens
to be serializing updates of the former. For RT there's another one -
->d_lock taken to protect ->d_seq modifications really should not be
preempted in favour of anything that might do read_seqcount_begin on
->d_seq. The biggest such section is in __d_move(), AFAICS, and it's not
_that_ big; can't RT simply have them protected by whatever it has that
really prevents preempt?
IOW, instead of all that stuff, how about
about_to_modify_seq_holding_lock(&dentry->d_seq, &dentry->d_lock);
done_modifying_seq(&dentry->d_seq, &dentry->d_lock);
around those 3 or 4 areas in fs/dcache.c, to give RT the missing information?
next prev parent reply other threads:[~2012-03-15 17:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 11:44 [patch 0/5] seqlock consolidation Thomas Gleixner
2012-03-15 11:44 ` [patch 1/5] seqlock: Remove unused functions Thomas Gleixner
2012-03-15 16:29 ` Linus Torvalds
2012-03-15 17:39 ` Al Viro [this message]
2012-03-15 17:53 ` Thomas Gleixner
2012-03-15 11:44 ` [patch 3/5] seqlock: Provide seq_spin_* functions Thomas Gleixner
2012-03-15 11:44 ` [patch 2/5] seqlock: Use seqcount for seqlock Thomas Gleixner
2012-03-15 11:44 ` [patch 4/5] fs: fs_struct use seqlock Thomas Gleixner
2012-03-15 11:44 ` [patch 5/5] fs: Use seqlock in struct dentry Thomas Gleixner
2012-03-15 12:21 ` [patch 0/5] seqlock consolidation Al Viro
2012-03-15 12:28 ` Thomas Gleixner
2012-03-15 17:43 ` Al Viro
2012-03-15 17:55 ` Thomas Gleixner
2012-03-15 18:39 ` Al Viro
2012-03-15 19:17 ` Thomas Gleixner
2012-03-15 20:42 ` Al Viro
2012-03-15 22:08 ` Thomas Gleixner
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=20120315173937.GC8943@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@kernel.dk \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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.