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)
commit14bd9a607f9082e7b5690c27e69072f2aeae0de4
tree8c99d5e23e98970f5c938a29d41b1dfa0596fceb
parent8cec63e52966b6c1242f8323535532d791d440e8
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