From: James Rizzo Place nr_active_requests_shared_tags on its own cache line so it does not share a cache line with nr_requests and other hot fields, avoiding significant performance hits from false sharing on some CPU architectures. Signed-off-by: James Rizzo Signed-off-by: Sumit Saxena --- include/linux/blkdev.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d463b9b5a0a5..7ed566c81c1b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -561,7 +561,9 @@ struct request_queue { struct timer_list timeout; struct work_struct timeout_work; - atomic_t nr_active_requests_shared_tags; + /* ensure nr_active_requests_shared_tags and nr_requests are on different cache lines + to avoid significant performance hits on cache line contention on some CPU architectures */ + atomic_t nr_active_requests_shared_tags ____cacheline_aligned_in_smp; struct blk_mq_tags *sched_shared_tags; -- 2.43.7