[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200816041720.GG17456@casper.infradead.org>
Date: Sun, 16 Aug 2020 05:17:20 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 2/2] mm/pageblock: remove false sharing in pageblock_flags
On Sun, Aug 16, 2020 at 11:47:57AM +0800, Alex Shi wrote:
> Current pageblock_flags is only 4 bits, so it has to share a char size
> in cmpxchg when get set, the false sharing cause perf drop.
>
> If we incrase the bits up to 8, false sharing would gone in cmpxchg. and
> the only cost is half char per pageblock, which is half char per 128MB
> on x86, 4 chars in 1 GB.
I don't believe this patch has that effect, mostly because it still does
cmpxchg() on words instead of bytes.
But which functions would benefit? It seems to me this cmpxchg() is
only called from the set_pageblock_migratetype() morass of functions,
none of which are called in hot paths as far as I can make out.
So are you just reasoning by analogy with the previous patch where you
have measured a performance improvement, or did you send the wrong patch,
or did I overlook a hot path that calls one of the pageblock migration
functions?
Powered by blists - more mailing lists