workqueue: Re-order struct worker fields
authorTejun Heo <tj@kernel.org>
Thu, 18 May 2023 03:02:08 +0000 (17:02 -1000)
committerTejun Heo <tj@kernel.org>
Thu, 18 May 2023 03:02:08 +0000 (17:02 -1000)
commit3a46c9833c1fad3b4a91bbbeb856810c7e1d8e47
tree4e44a0423af3aedcae65cb1997026415baff99b1
parent725e8ec59c56c65fb92e343c10a8842cd0d4f194
workqueue: Re-order struct worker fields

struct worker was laid out with the intent that all fields that are modified
for each work item execution are in the first cacheline. However, this
hasn't been true for a while with the addition of ->last_func. Let's just
collect hot fields together at the top.

Move ->sleeping in the hole after ->current_color and move ->lst_func right
below. While at it, drop the cacheline comment which isn't useful anymore.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
kernel/workqueue_internal.h