]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/iova: Separate atomic variables to improve performance
authorJinyu Qi <jinyuqi@huawei.com>
Wed, 3 Apr 2019 08:35:21 +0000 (16:35 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 11 Apr 2019 13:42:54 +0000 (15:42 +0200)
commitaeebacaba845aa86003f4b57ecf10bef250a6b4c
tree8c99d5e23e98970f5c938a29d41b1dfa0596fceb
parent317c511dab1e34ebca79b65d2593251fdef30a55
iommu/iova: Separate atomic variables to improve performance

In struct iova_domain, there are three atomic variables, the former two
are about TLB flush counters which use atomic_add operation, anoter is
used to flush timer that use cmpxhg operation.
These variables are in the same cache line, so it will cause some
performance loss under the condition that many cores call queue_iova
function, Let's isolate the two type atomic variables to different
cache line to reduce cache line conflict.

Cc: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Jinyu Qi <jinyuqi@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
include/linux/iova.h