Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Bergmann
Date: Saturday, April 24, 2010 - 1:40 pm

On Saturday 24 April 2010 22:01:18 Linus Torvalds wrote:

With CONFIG_BKL disabled, we gain a few cyles in the scheduler,
since we no longer need to check if the BKL was held and needs to
be released. Not much, but better than just a few bytes of object size.

With CONFIG_BKL=m, what we gain is visibility: Doing an lsmod will
show you if bkl.ko is loaded and what other modules are using it.
My hope is that this will motivate people to remove it from the
remaining modules.
One of the crazier ideas was to automatically taint the kernel when
bkl.ko gets loaded. This does not gain us anything besides making a
statement.


Being able to grep is not the reason for this patch. The reason is that
we're trying to eliminate the BKL from all non-obscure code in the kernel
and one of the nasty ones is fs/ioctl.c, which always gets compiled in.
The trick with bkl.ko requires that any code calling lock_kernel() needs
to be a module, so the deprecated_ioctl() helper will have to be part
of bkl.ko as well.


Ok. We'll go back to my intial approach for ioctl then, doing it all at
once. The reason for the staged approach was to avoid bisect breakage
and conflicts with maintainer updates, but since most of the remaining
users at this point are really unmaintained (or staging drivers), there's
probably not much to worry about here.

There will be one patch that does three things:
- add a deprecated_ioctl() function
- rename fops->ioctl to fops->bkl_ioctl
- set fops->unlocked_ioctl=deprecated_ioctl for any file_operations instance
  that uses bkl_ioctl
Is this ok for you?

Regarding the CONFIG_BKL option, should that also be done as another patch
changing all the Kconfig files? My preference would be to have one patch
adding the Kconfig option first, giving the maintainers the choice to either
mark their code 'depends on BKL' or to remove the dependency by changing
their code.

	Arnd
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Thu Apr 15, 8:56 pm)
[GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Wed Apr 21, 5:48 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Sat Apr 24, 8:25 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Sat Apr 24, 11:36 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Sat Apr 24, 11:47 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Sat Apr 24, 12:54 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Sat Apr 24, 1:01 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Sat Apr 24, 1:40 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Sat Apr 24, 3:15 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Sun Apr 25, 10:39 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Sun Apr 25, 10:49 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Sun Apr 25, 11:05 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Ingo Molnar, (Mon Apr 26, 12:25 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Mon Apr 26, 1:30 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Mon Apr 26, 4:29 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Mon Apr 26, 11:08 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Mon Apr 26, 12:12 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Mon Apr 26, 1:36 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, David Miller, (Mon Apr 26, 1:42 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Mon Apr 26, 3:09 pm)
[PATCH 0/6] Push down BKL into device drivers, Arnd Bergmann, (Mon Apr 26, 3:23 pm)
[PATCH 1/6] dvb: push down BKL into ioctl functions, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
[PATCH 2/6] scsi: push down BKL into ioctl functions, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
[PATCH 3/6] isdn: push down BKL into ioctl functions, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
[PATCH 4/6] staging: push down BKL into ioctl functions, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
[PATCH 5/6] v4l: always use unlocked_ioctl, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
[PATCH 6/6] drivers: push down BKL into various drivers, Arnd Bergmann, (Mon Apr 26, 3:24 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Linus Torvalds, (Mon Apr 26, 3:32 pm)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Mon Apr 26, 4:04 pm)
Re: [PATCH 0/6] Push down BKL into device drivers, John Kacur, (Tue Apr 27, 2:14 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Ingo Molnar, (Tue Apr 27, 2:25 am)
Re: [PATCH 4/6] staging: push down BKL into ioctl functions, Frederic Weisbecker, (Tue Apr 27, 11:15 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Frederic Weisbecker, (Wed Apr 28, 6:21 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Ingo Molnar, (Wed Apr 28, 6:37 am)
Re: [GIT PULL v2] Preparation for BKL'ed ioctl removal, Arnd Bergmann, (Wed Apr 28, 7:05 am)