workqueue: could work->func be reused for private data by introducing per-wq default function?

From: Gao Xiang
Date: Tue May 01 2018 - 04:57:52 EST


Hi Tejun Heo, Lai Jiangshan,


ÂÂÂ I don't know whether the related topic was discussed or not (or it's actually an insane proposal :( )

ÂÂÂ It seems that the most of workqueues INIT_WORK by a default handle function.

ÂÂÂ So could we use a per-workqueue default handle function for these workqueues, and leave an extra private data field for each work_struct?

ÂÂÂ There are so many work_structs that we could reuse the func field for the other uses.

ÂÂÂ Is it acceptable? I haven't dived into the workqueue implementation yet, but it seems not straight-forward for find_worker_executing_work, etc. at a glance.


ÂÂÂ Thanks,

Gao Xiang