kthread: Export kthread_data()
PATCH 1/1 kthread: Export kthread_data()
When multiple kernel threads are created to cooperatively work on a common task, we may need a convenient way to access data that are specific to each kthread.
The kthread_data() function fits this need. However, it was not visible to kthreads started in a kernel module. To solve this problem, the kthread_data() function is now exported allowing kthreads from kernel modules to use it.
--- kernel/kthread.c | 1 + 1 file changed, 1 insertion(+)
kernel/kthread.c +1 -0
@@ -156,6 +156,7 @@ void *kthread_data(struct task_struct *task) {return to_kthread (task)->data; } +EXPORT_SYMBOL (kthread_data);/** * kthread_probe_data - speculative version of kthread_data()
Signature · 1 line
1.8.3.1
Quoted 8 lines · Waiman Long
When multiple kernel threads are created to cooperatively work on a common task, we may need a convenient way to access data that are specific to each kthread.
The
kthread_data()function fits this need. However, it was not visible to kthreads started in a kernel module. To solve this problem, thekthread_data()function is now exported allowing kthreads from kernel modules to use it.
No. Without an in-tree user, no export.
Quoted 8 lines · Waiman Long
When multiple kernel threads are created to cooperatively work on a common task, we may need a convenient way to access data that are specific to each kthread.
The
kthread_data()function fits this need. However, it was not visible to kthreads started in a kernel module. To solve this problem, thekthread_data()function is now exported allowing kthreads from kernel modules to use it.
Please send this along wit hthe actual user of it.
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Waiman Long
When multiple kernel threads are created to cooperatively work on a common task, we may need a convenient way to access data that are specific to each kthread.
The
kthread_data()function fits this need. However, it was not visible to kthreads started in a kernel module. To solve this problem, thekthread_data()function is now exported allowing kthreads from kernel modules to use it.Please send this along wit hthe actual user of it.
It is the developers of the dm-vdo/kvdo modules that would like to use the kthread_data() function. See
https://github.com/dm-vdo/kvdo
Those modules have a bunch of kernel threads working on block storage deduplication/compression.
-Longman
Quoted 14 lines · Waiman Long
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Waiman Long
When multiple kernel threads are created to cooperatively work on a common task, we may need a convenient way to access data that are specific to each kthread.
The
kthread_data()function fits this need. However, it was not visible to kthreads started in a kernel module. To solve this problem, thekthread_data()function is now exported allowing kthreads from kernel modules to use it.Please send this along wit hthe actual user of it.
It is the developers of the dm-vdo/kvdo modules that would like to use the
kthread_data()function. See
Quoted 7 lines
https://github.com/dm-vdo/kvdo
Those modules have a bunch of kernel threads working on block storage deduplication/compression.
-Longman
BTW, I am fine with not exporting the function. They just have to find an alternative way of doing it.
-Longman