As part of this week's block subsystem fixes for the Linux 7.4-rc4 kernel release due out on Sunday are many bug fixes plus also a nice NVMe namespaces optimization. The block fixes for the week aren't too exciting and continue with the AI/LLM-driven flow of kernel activity. What I found most interesting was the change to the Linux NVMe code to now remove namespaces in parallel. For those splitting up NVMe storage devices into logically isolated storage volumes via NVMe namespaces, when it comes to removing them will be faster than on existing kernel versions. The NVMe namespaces code is useful for multi-tenant environments, workload isolation, security, and more. The Linux NVMe namespace removal code to this point just removed one namespace after another, which can become a bottleneck in some complex modern Linux server deployments. Software engineer Qiliang Yuan worked through this shortcoming in the NVMe namespaces code. Yuan explained in the patch making it parallel: "nvme_remove_namespaces() removes the namespaces of a controller one after another. Each removal waits for RCU grace periods in del_gendisk() for the namespace and for its multipath head, about 20 ms in all. Deleting a controller, such as disconnecting from a fabrics target, thus takes time proportional to its namespace count, over a second for 64 namespaces. Scanning had the same problem until commit 4e893ca81170 ("nvme_core: scan namespaces asynchronously") made it add namespaces in parallel. Remove the namespaces through an async domain the same way, and wait for all of them before returning. Each removal still waits about 20 ms, but the waits now overlap: a grace period is system-wide, so removals that wait at the same time are released by the same grace periods instead of each needing its own." In the end a useful optimization for those making use of NVMe namespaces. The change was merged for the Linux 7.4 kernel via this week's block pull request.
Linux 7.4 To Remove NVMe Namespaces In Parallel For Faster Results
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.