deprecate the tasklist_lock export
PATCH 1/1 deprecate the tasklist_lock export
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
arch/ia64/kernel/mca.c
drivers/edac/edac_mc.c
fs/binfmt_elf.c
which I'll send out fixes for soon.
Documentation/feature-removal-schedule.txt +11 -0
@@ -182,3 +182,14 @@ implementation details and provides a higherlevel interface that prevents bugs and code duplication Who: Christoph Hellwig <[email protected]> + +--------------------------- + +What: remove EXPORT_SYMBOL(tasklist_lock) +When: August 2006 +Files: kernel/fork.c +Why: tasklist_lock protects the kernel internal task list. Modules have + no business looking at it, and all instances in drivers have been due + to use of too-lowlevel APIs. Having this symbol exported prevents + moving to more scalable locking schemes for the task list. +Who: Christoph Hellwig <[email protected]>
Quoted 9 lines · Christoph Hellwig
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
arch/ia64/kernel/mca.c
drivers/edac/edac_mc.c
fs/binfmt_elf.cwhich I'll send out fixes for soon.
Hmm, I have some debug modules that do use that lock. Is it possible to export it only if CONFIG_DEBUG_KERNEL? If this isn't proper either, it's no big deal. I'll just make a patch that exports it, and add it to my kernel before debugging. I'm just asking to make my life more convenient :-)
-- Steve
Quoted 9 lines · Christoph Hellwig
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
arch/ia64/kernel/mca.c
...
fs/binfmt_elf.cwhich I'll send out fixes for soon.
...
These two can't be built modular.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedIn article <[email protected]> you write:
Quoted 2 lines
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
CIPE is a driver which consists of a kernel module and a userspace program, where each one of possibly many kernel devices is associated with exactly one userspace process, and it uses the task list to keep track of these associations. Is there a recommended other way to handle such a situation?
Olaf
Quoted 2 lines · Steven Rostedt
Hmm, I have some debug modules that do use that lock. Is it possible to export it only if
CONFIG_DEBUG_KERNEL?
That doesn't make a whole lot of sense. What's your debug module doing? Should we just put it in the tree as builtin-code under a debug option?
Quoted 4 lines · Adrian Bunk
Quoted 3 lines · Christoph Hellwig
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
Quoted 8 lines
Quoted 6 lines
arch/ia64/kernel/mca.c
...
fs/binfmt_elf.cwhich I'll send out fixes for soon.
...These two can't be built modular.
s390 and sparc64 allows a modular BINFMT_ELF32, which #includes fs/binfmt_elf.c after redefining various things. But I suspect the right fix for this is to disallow building it modular..
For arch/ia64/kernel/mca.c you're right. Other mca files can be built modular and need odd symbols aswell, but mca.c is always built in.
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Steven Rostedt
Hmm, I have some debug modules that do use that lock. Is it possible to export it only if
CONFIG_DEBUG_KERNEL?That doesn't make a whole lot of sense. What's your debug module doing? Should we just put it in the tree as builtin-code under a debug option?
Nah, It's not worth it. I have some mutex test modules that search the tasks to determine what priorities are there and uses that info for setting the priorities of the threads it creates. Yes, this can be done from userland as well, but i was being lazy and just wrote eveything in the module.
So, forget what I asked for and do what you want. These modules are really just for testing specific things that I work on and I can find other ways around it. Really the easiest thing is to just add the EXPORT myself since I need to recompile the kernel anyways.
Thanks anyway,
-- Steve
Quoted 12 lines · Christoph Hellwig
Quoted 11 lines · Adrian Bunk
Quoted 9 lines · Christoph Hellwig
Drivers have no business looking at the task list and thus using this lock. The only possibly modular users left are:
arch/ia64/kernel/mca.c
...
fs/binfmt_elf.cwhich I'll send out fixes for soon.
...
Quoted 6 lines
Quoted 1 line
These two can't be built modular.
s390 and sparc64 allows a modular
BINFMT_ELF32, which #includesfs/binfmt_elf.cafter redefining various things. But I suspect the right fix for this is to disallow building it modular..
...
Argh, I hate code #include'ing .c files.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed