The above article says: The most important thing in Process_one_work is worker->current_func (work);
This is specific to a very specific task, because I want to study the file system, so it is natural to the specific task:
void Wb_workfn (struct work_struct *work)
First, the work variable is just a booster, where is the real master?
struct Bdi_writeback *WB = container_of (to_delayed_work (work),
struct Bdi_writeback, Dwok);
According to Bdi_writeback, we can find this series of dirty Inode, and then write back the data inside [finally take a breath, because we finally have access to some of the file system-related concepts.]
[There is also a point that is particularly enlightening, saying that a work_poll can correspond to multiple kworker, thinking that if there is a lot of dirty pages in the file system, there will be a lot of work, so that different work may be performed by multiple different threads in the pool]
We're more familiar with the code behind it.
The WB_WORKFN function of workqueue mechanism analysis