From: Jan Blunck <jblunck@suse.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>,
Jiri Kosina <jkosina@suse.cz>,
Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org, Matthew Wilcox <matthew@wil.cx>,
Thomas Gleixner <tglx@linutronix.de>,
Alan Cox <alan@linux.intel.com>, Ingo Molnar <mingo@elte.hu>,
John Kacur <jkacur@redhat.com>
Subject: Re: [GIT, RFC] Killing the Big Kernel Lock
Date: Thu, 8 Apr 2010 22:45:45 +0200 [thread overview]
Message-ID: <20100408204545.GM10776@bolzano.suse.de> (raw)
In-Reply-To: <201003282205.50886.arnd@arndb.de>
On Sun, Mar 28, Arnd Bergmann wrote:
> On Sunday 28 March 2010, Stefan Richter wrote:
> > Arnd Bergmann wrote:
> > > Your patches look good, but it would be helpful to also set .llseek = no_llseek
> > > in the file operations, because that is much easier to grep for than
> > > only the nonseekable_open. While it's technically a NOP on the presence of
> > > nonseekable_open, it will help that I don't accidentally apply my patch on
> > > top of yours.
> >
> > Sounds like a plan, but (a) if my .llseek = no_llseek and your .llseek =
> > default_llseek are not within diff context range, you (or whoever else
> > merges mine and yours) only get a compiler warning (Initializer entry
> > defined twice) rather than a merge conflict which couldn't be missed,
> > (b) there won't be a merge conflict in "BKL removal: mark remaining
> > users as 'depends on BKL'". (c) While I don't mind adding more visual
> > clutter to ieee1394/*, I prefer terse coding in firewire/*.
> >
> > How about I put my nonseekable_open additions into a release branch and
> > send you a pull request after a few days exposure in linux-next? If you
> > do not plan to respin your patch queue soon or at all, I could even let
> > you pull a for-arnd branch with a semantically correct merge of yours
> > and mine.
>
> I can probably remember this specific one now, but for other people
> doing the same on their subsystems, adding no_llseek may help reduce
> the need for coordination.
>
> > General thoughts:
> >
> > ".llseek = NULL," so far meant "do the Right Thing on lseek() and
> > friends, as far as the fs core can tell". Shouldn't we keep it that
> > way? It's as close to other ".method = NULL," as it can get, which
> > either mean "silently skip this method if it doesn't matter" (e.g.
> > .flush) or "fail attempts to use this method with a fitting errno" (e.g.
> > .write).
>
> My series changes the default from 'default_llseek' to 'generic_file_llseek',
That is not that easy. generic_file_llseek() is testing against 'offset <
inode->i_sb->s_maxbytes'. This is not necessarily true when you think about
directories with random offset cookies. I know that seeking on directories is
stupid but don't blame me.
> which is almost identical, except for taking the inode mutex instead of the
> BKL. Another option that has been discussed before is to make no_llseek
> the default, but that might cause more serious problems wiht drivers that
> really require seeking.
>
> Since using default_llseek can only ever make a difference if the driver
> actually uses the BKL in any other function, I could go through the
> patches again and revert those that do no use the BKL anywhere else.
>
> > Of course, as we have already seen with infiniband, firewire, ieee1394,
> > .llseek = NULL is ambiguous in practice. Does the driver really want to
> > use default_llseek, or should it rather use no_llseek and/or
> > nonseekable_open, or should it even implement a dummy_llseek() { return
> > 0; } which avoids the BKL but preserves ABI behaviour? This needs to be
> > resolved for each and every case eventually, regardless of whether or
> > when your addition of .llseek = default_llseek enters mainline.
>
> Yes, that also sounds like a good idea. I believe that Jan actually posted
> a patch to do that at some point.
Yes, it is in
http://git.infradead.org/users/jblunck/linux-2.6.git bkl/default-lseek
There are some other patches in that branch that are not upstream yet. Mind to
take them for your bkl-removal branch?
Cheers,
Jan
next prev parent reply other threads:[~2010-04-08 20:45 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 21:40 [GIT, RFC] Killing the Big Kernel Lock Arnd Bergmann
2010-03-24 21:07 ` Andrew Morton
2010-03-25 10:26 ` Arnd Bergmann
2010-03-28 20:33 ` Frederic Weisbecker
2010-03-24 21:53 ` Roland Dreier
2010-03-24 21:59 ` Arnd Bergmann
2010-03-31 5:22 ` Roland Dreier
2010-03-24 22:10 ` Alan Cox
2010-03-24 22:25 ` Arnd Bergmann
2010-03-24 22:23 ` Ingo Molnar
2010-03-25 12:55 ` Jiri Kosina
2010-03-25 13:06 ` Arnd Bergmann
2010-03-25 13:38 ` Arnd Bergmann
2010-03-26 23:47 ` Stefan Richter
2010-03-27 9:16 ` [PATCH] firewire: char device files are not seekable (BKL removal) Stefan Richter
2010-03-27 9:20 ` [PATCH] ieee1394: " Stefan Richter
2010-03-27 10:40 ` [PATCH RFC] DVB: add dvb_generic_nonseekable_open, dvb_generic_unlocked_ioctl, use in firedtv Stefan Richter
2010-03-28 14:47 ` [PATCH RFC v2] " Stefan Richter
2010-03-27 14:37 ` [GIT, RFC] Killing the Big Kernel Lock Arnd Bergmann
2010-03-28 12:27 ` Stefan Richter
2010-03-28 20:05 ` Arnd Bergmann
2010-03-28 20:15 ` Frederic Weisbecker
2010-03-28 21:34 ` Arnd Bergmann
2010-03-28 23:24 ` Frederic Weisbecker
2010-04-08 20:45 ` Jan Blunck [this message]
2010-04-08 21:27 ` Arnd Bergmann
2010-04-08 21:30 ` Frederic Weisbecker
2010-04-09 11:02 ` Jan Blunck
2010-04-10 15:13 ` Stefan Richter
2010-03-28 21:58 ` Andi Kleen
2010-03-29 1:07 ` [GIT, RFC] Killing the Big Kernel Lock II Andi Kleen
2010-03-29 11:48 ` Arnd Bergmann
2010-03-29 12:30 ` Andi Kleen
2010-03-29 14:43 ` Arnd Bergmann
2010-03-29 20:11 ` Andi Kleen
2010-03-31 15:30 ` Arnd Bergmann
2010-03-25 13:40 ` [GIT, RFC] Killing the Big Kernel Lock Dan Carpenter
2010-03-25 14:14 ` Arnd Bergmann
2010-03-28 20:04 ` Frederic Weisbecker
2010-03-28 20:11 ` Frederic Weisbecker
2010-03-28 23:18 ` Frederic Weisbecker
2010-03-28 23:38 ` Frederic Weisbecker
2010-03-29 11:04 ` Arnd Bergmann
2010-03-29 17:59 ` Frederic Weisbecker
2010-03-29 21:18 ` Arnd Bergmann
2010-03-29 12:45 ` John Kacur
2010-03-31 22:11 ` Roland Dreier
2010-03-31 22:20 ` Frederic Weisbecker
2010-04-01 8:50 ` Arnd Bergmann
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=20100408204545.GM10776@bolzano.suse.de \
--to=jblunck@suse.de \
--cc=alan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=fweisbec@gmail.com \
--cc=jkacur@redhat.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mingo@elte.hu \
--cc=stefanr@s5r6.in-berlin.de \
--cc=tglx@linutronix.de \
/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).