driver-core: async probe support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 17 repliesIn review
- v15 patches 29 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | taint: add TAINT_DEBUG for invasive debugging featuresDocumentation/ include/ kernel/ +1 more | +6 | 2 replies | |
| 2/7 | module: add extra argument for parse_params() callbackarch/ include/ init/ +3 more | +32 | 5 replies | |
| 3/7 | driver-core: enable drivers to opt-out of async probeinclude/ | +3 | 0 replies | |
| 4/7 | amd64_edac: enforce synchronous probedrivers/ | +1 | 0 replies | |
| 5/7 | driver-core: generalize freeing driver private memberdrivers/ | +10 | 0 replies | |
| 6/7 | driver-core: add driver module asynchronous probe supportDocumentation/ drivers/ drivers/ +3 more | +133 | 0 replies | |
| 7/7 | driver-core: add preferred async probe option for built-in and modulesDocumentation/ drivers/ include/ | +60 | 10 replies |
Reviews trailers per patch
3 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Tom Gundersen | Tejun Heo | Rusty Russell |
|---|---|---|---|
| 1/7 | |||
| 2/7 | A-b | ||
| 3/7 | |||
| 4/7 | |||
| 5/7 | |||
| 6/7 | A-b | ||
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/7] driver-core: async probe support
From: "Luis R. Rodriguez" <[email protected]>
This second series addresses all comments from the v1 series, it removed the white list, tidies up the commit logs, adds documentation for the kernel parameters, adds a new debug taint flag and uses it for the testing kernel parameters we have added. This series also now goes with built-in async probe support by defining a kernel parameter bus.enable_kern_async=1 userspace can set to indicate to the kernel userspace has been vetted for async probe support. This essentially means you will verify your userspace will not depend on sync probe on scripts / daemons, and if such issues exist you're willing to fix this in userspace. All of these features require userspace intervention so by default synchronous probe is used just as before. Both mechanisms allow us to create a new async probe universe safely without affecting old userspace.
Folks wanting to do immediate testing can compile and just load modules manually with async_probe=1 as a module parameter for
any module they wish to probe asynchrounously. Folks wishing to test a debug feature to enable *all* modules to be probed asynchronously can enable bus.__DEBUG__module_force_mod_async_probe=1 Likewise to test all built-in drivers with async probe folks can use both bus.enable_kern_async=1 and bus.__DEBUG__kernel_force_mod_async_probe=1. Any of these new __DEBUG__ kernel parameters will taint your kernel, in practice for now folks should not be surprised if they run into issues with any of these parameters until async probe gets widely tested and drivers which require sync probe are found. This series goes with one example driver where sync probe was required, a fix to the driver is pending to enable async probe but the issue has already been identified and should be easy to fix.
Folks wishing to test built-in drivers can enable
bus.enable_kern_async=1
and then modify their driver with something like this:
drivers/net/ethernet/intel/e1000e/netdev.c +1 -0
@@ -7241,6 +7241,7 @@ static struct pci_driver e1000_driver = { .remove = e1000_remove, .driver = { .pm = &e1000_pm_ops, + .prefer_async_probe = true, }, .shutdown = e1000_shutdown, .err_handler = &e1000_err_handler
This will *not* taint your kernel. Folks wishing to go all out and use async probe for *all* device drivers, whether built-in or not can enable the following and start debugging drivers as their heart pleases:
bus.enable_kern_async=1 bus.__DEBUG__module_force_mod_async_probe=1 bus.__DEBUG__kernel_force_mod_async_probe=1
I've given this a whirl on 3 different machines now, bus.__DEBUG__module_force_mod_async_probe=1 is actually fine for all 3 systems however bus.__DEBUG__kernel_force_mod_async_probe=1 requires quite a bit of drivers identified / annotated for sync probe.
Luis R. Rodriguez (7):
taint: add TAINT_DEBUG for invasive debugging features
module: add extra argument for parse_params() callback
driver-core: enable drivers to opt-out of async probe
amd64_edac: enforce synchronous probe
driver-core: generalize freeing driver private member
driver-core: add driver module asynchronous probe support
driver-core: add preferred async probe option for built-in and modules
Documentation/kernel-parameters.txt | 16 ++++ Documentation/sysctl/kernel.txt | 1 + arch/powerpc/mm/hugetlbpage.c | 4 +- drivers/base/base.h | 6 ++ drivers/base/bus.c | 149 ++++++++++++++++++++++++++++++++++-- drivers/base/dd.c | 7 ++ drivers/edac/amd64_edac.c | 1 + include/linux/device.h | 12 +++ include/linux/kernel.h | 1 + include/linux/module.h | 2 + include/linux/moduleparam.h | 3 +- init/main.c | 25 +++--- kernel/module.c | 20 +++-- kernel/panic.c | 2 + kernel/params.c | 11 ++- lib/dynamic_debug.c | 4 +- 16 files changed, 234 insertions(+), 30 deletions(-)
Signature · 1 line
2.1.1