Messages in this thread | | | From | "蒋雄伟(蒋冲)" <> | Subject | raid5: how to bind worker threads to specified cpus | Date | Thu, 13 Sep 2018 16:18:48 +0800 |
| |
Since commit b721420e8719131896b009b11edbbd27d9b85e98, raid5 has been enabled to support workqueue offload handling of stripes. However, if I hope to bind worker threads to specified cpus, for example 0-3, is it possible? The reason for doing this is that I hope applications will not be disturbed by raid5's jobs. My naive idea is to add a field named "affinity_hint" to struct r5conf, and then add a sysfs entry to input cpu list, and then take stripe_head's sector as the hash key to evenly distribute stripe_head across the cpus. Anyone has suggestion about my idea or any alternative solutions to bind worker threads to specified cpus ? thanks a lot .
| |