Re: [PATCH v4 3/4] mm/pageblock: work around multiple arch's cmpxchg support issue

From: Christoph Hellwig
Date: Thu Sep 10 2020 - 01:54:13 EST


On Thu, Sep 03, 2020 at 03:01:22PM +0800, Alex Shi wrote:
> Armv6, sh2, sparc32 and xtensa can not do cmpxchg1, so we have to use
> cmpxchg4 on it.
>
> Here we mark above 4 arch's NO_CMPXCHG_BYTE, and would add more if we
> found.
>
> This is the first usages of cmpxchg flase sharing change. We'd better
> check more cmpxchg usages in current kernel...

I think a positive symbol, e.g. HAVE_CMPXCHG_BYTE is a lot easier to
understand, and also fool-proof.