Asynchronous device/driver probing support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 16 repliesIn review
- v18 patches 26 repliesSuperseded
Changes in v2 from the cover letter
- Changed verbage in change logs and code to emphasise that PROBE_PREFER_ASYNCHRONOUS is a temporary measure and the end goal is to enable asynchronous probing by default, as requested by Tejun.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | module: add extra argument for parse_params() callbackarch/ include/ init/ +3 more | +32 | 0 replies | |
| 2/8 | driver-core: add asynchronous probing support for driversdrivers/ drivers/ drivers/ +1 more | +182 | 7 replies | |
| 3/8 | driver-core: add driver module asynchronous probe supportDocumentation/ drivers/ include/ +2 more | +27 | 0 replies | |
| 4/8 | driver-core: enable drivers to opt-out of async probedrivers/ include/ | +17 | 0 replies | |
| 5/8 | driver-core: platform_driver_probe() must probe synchronouslydrivers/ | +13 | 0 replies | |
| 6/8 | amd64_edac: enforce synchronous probedrivers/ | +1 | 0 replies | |
| 7/8 | module: add core_param_unsafeinclude/ | +9 | 0 replies | |
| 8/8 | driver-core: allow enabling async probing for all modules and builtinsDocumentation/ drivers/ kernel/ | +26 | 4 replies |
Reviews trailers per patch
3 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Tejun Heo | Rusty Russell |
|---|---|---|
| Series | A-b | |
| 1/8 | R-b | A-b |
| 2/8 | ||
| 3/8 | ||
| 4/8 | ||
| 5/8 | ||
| 6/8 | R-b | |
| 7/8 | A-b | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/8] Asynchronous device/driver probing support
This series is a combination of changes proposed by Luis a couple months ago and implementation used by Chrome OS. The issue we are trying to solve here is "slow" devices and drivers spending "too much time" in their probe() methods and it affects:
- overall kernel boot process when drivers are compiled into the kernel and slow devices stall entire boot progress;
- systemd desire to time out module loading process.
Unlike Luis' proposal we do make use of asycn_schedule() infrastructure instead of using a dedicated workqueue, so all existing synchronization points in kernel that wait for device registration still work the same. Also, the asynchronous probing is done not only during driver registration (i.e. when devices are probed asynchronously only if they are registered before the driver), but also during device registration and deferred probe handling. This way slow devices do not stall kernel boot even when drivers are compiled into the kernel.
The last patch is for adventurous people to try and force fully-asynchronous boot. It works for me with limited success - I can boot Rockhip-based box to userspace as long as I force serial to be sychronously probed and ignore the fact that most devices are using "dummy" regulators as regulator subsystem really expects regulators to be registered in orderly fashion on OF-based systems.
Changes from v1:
- Changed verbage in change logs and code to emphasise that PROBE_PREFER_ASYNCHRONOUS is a temporary measure and the end goal is to enable asynchronous probing by default, as requested by Tejun.
Thanks,
Dmitry