[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211011073239.GA63896@kvm.asia-northeast3-a.c.our-ratio-313919.internal>
Date: Mon, 11 Oct 2021 07:32:39 +0000
From: Hyeonggon Yoo <42.hyeyoo@...il.com>
To: Christoph Lameter <cl@...two.de>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH] mm, slub: Use prefetchw instead of prefetch
On Mon, Oct 11, 2021 at 09:20:36AM +0200, Christoph Lameter wrote:
> On Fri, 8 Oct 2021, Hyeonggon Yoo wrote:
>
> > It's certain that an object will be not only read, but also
> > written after allocation.
>
> get_freepointer is used in multiple code path not only in allocation. It
> is for example used when scanning through a freelist.
>
> With this change all objects get needlessly dirtied and the cross cpu
> cache contention is increased.
I didn't touch get_freepointer and there's
only one caller of prefetch_freepointer.
My change was not adding additional prefetch on get_freepointer,
but changing existing prefetch into prefetchw.
The prefetch was introcued by commit 0ad9500e16fe ("slub: prefetch next
freelist pointer in slab_alloc()") that you ACKed in 2011.
Do you think removeing existing prefetch is better than changing it
from prefetch to prefetchw?
Powered by blists - more mailing lists