Re: [PATCH v2 0/2] iommu/amd: Don't use atomic64_t for domain->pt_root

From: Qian Cai
Date: Fri Jun 26 2020 - 08:30:29 EST




> On Jun 26, 2020, at 4:05 AM, Joerg Roedel <joro@xxxxxxxxxx> wrote:
>
> a previous discussion pointed out that using atomic64_t for that
> purpose is a bit of overkill. This patch-set replaces it with unsigned
> long and introduces some helpers first to make the change more easy.

BTW, from the previous discussion, Linus mentioned,

â
The thing is, the 64-bit atomic reads/writes are very expensive on
32-bit x86. If it was just a native pointer, it would be much cheaper
than an "atomic64_t".
â

However, here we have AMD_IOMMU depend on x86_64, so I am wondering if it makes any sense to run this code on 32-bit x86 at all?