lkml.org 
[lkml]   [2010]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [GIT, RFC] Killing the Big Kernel Lock
    Date
    On Monday 29 March 2010 19:59:39 Frederic Weisbecker wrote:
    > On Mon, Mar 29, 2010 at 12:04:24PM +0100, Arnd Bergmann wrote:
    > > On Monday 29 March 2010, Frederic Weisbecker wrote:
    > > > On Mon, Mar 29, 2010 at 01:18:48AM +0200, Frederic Weisbecker wrote:
    > > > > @@ -1943,7 +1949,7 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf,
    > > > > }
    > > > >
    > > > > static const struct file_operations proc_fdinfo_file_operations = {
    > > > > - .open = nonseekable_open,
    > > > > + .llseek = generic_file_llseek,
    > > > > .read = proc_fdinfo_read,
    > > > > };
    > > > >
    > > > >
    > > > > Replacing default_llseek() by generic_file_llseek() as you
    > > > > did for most of the other parts is fine.
    > > > >
    > > > > But the above changes the semantics as it makes it seekable.
    > > > > Why not just keeping it as is? It just ends up in no_llseek().
    > >
    > > The default is default_llseek, which uses the BKL and cannot be
    > > used if procfs is builtin and the BKL is a module.
    >
    > Yeah, but you removed the nonseekable_open and made generic_file_llseek
    > in llseek on this one.
    > This makes it seekable while it wasn't, changing its ABI.
    > It wasn't taking the bkl before that as it was calling
    > no_llseek().

    Ah, I see what you mean. That change was certainly not intentional
    an should be reverted. Thanks for pointing this out.

    > > The BKL in procfs is only for proc files that have registered
    > > their own .ioctl instead of .unlocked_ioctl method. Converting
    > > every file_operations instance to provide an unlocked_ioctl
    > > (as one of the other patches does) makes sure that this path
    > > is never taken. BTW, there are less than a handful of procfs files
    > > that provide an ioctl operation, and those probably should never
    > > have been merged.
    >
    >
    > There are three of them. I'm going to make them .unlocked_ioctl
    > and push the bkl inside, and warn on further uses of .ioctl,
    > without applying the bkl there anymore.
    >
    > That plus your bkl removal in proc seek, should totally remove the
    > bkl from procfs.

    Ok

    Arnd


    \
     
     \ /
      Last update: 2010-03-29 23:21    [W:3.725 / U:0.380 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site