From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C9FEC433FE for ; Mon, 11 Oct 2021 07:32:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D38660D07 for ; Mon, 11 Oct 2021 07:32:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D38660D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 781B66B006C; Mon, 11 Oct 2021 03:32:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 730FB900002; Mon, 11 Oct 2021 03:32:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61FFE6B0072; Mon, 11 Oct 2021 03:32:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id 520D56B006C for ; Mon, 11 Oct 2021 03:32:45 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 151341814B0C1 for ; Mon, 11 Oct 2021 07:32:45 +0000 (UTC) X-FDA: 78683339490.06.C8B1C48 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by imf18.hostedemail.com (Postfix) with ESMTP id AFBEF40039C7 for ; Mon, 11 Oct 2021 07:32:44 +0000 (UTC) Received: by mail-pl1-f179.google.com with SMTP id x8so10679637plv.8 for ; Mon, 11 Oct 2021 00:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WmIH+gyLv1IEII2jV9ccpTyXH9cYgsrJ11N5wI46Cwk=; b=XSShNGiojyLlUovr7IKaqfRGJpRi3a1nfwsAdlxge9m12kC+OTSVuy1GLR6B7pozzZ 2Rl6iMtuYWwkXbqErdqkCOJvgE8zZW/XFtcUZKKla8tOsX9oy/ysuNGtrIBm3LPm/3pj ljSQ4C42U4hH0U4gjFtNtkTqGLjSJwRigBLVFxv/19xbaoD3RShtJVW0p7gSvxgnLDCH 8G1/J3WaWfZzg4blcTzvQSK09T4S0dE44kil/HQRxDmBVrYquEjoCJ5Zn9o63MRSDq+H 5Eg4UMBXurLYyREnHl+Gk3MdPR2OuJOUg6yEOzOwMX4+vKeO6Z4gkSCoUoJ9TwGaD9fX dYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WmIH+gyLv1IEII2jV9ccpTyXH9cYgsrJ11N5wI46Cwk=; b=wF4f7+5lrnnNT0IHGHoNo7R8ZKxicQzDoS/ZNR7d7+bEJoIlh+wsV1OPVe4E7alcSZ 4VWQSKp8K0AR7gkeGqw9xMv5XQMJv7ozk8XQoDyzR7mlFz3dP1WHXZ01FZrZ6xaG4u/N qYYZsLqdQ9CfCCcDpY7g8B5qyt52/GLU7KeIqYTKuJb0a5MiKshmBD6Oom9A3dLr/hXa sfIjCpTwNv03w6INUa5JPLramY0JCxtNv9z+UlabPqkqp3EVFRteuieMhLppn3dhiG0e qQ9XcS2RyhfXVAoZAP4vWsqP0cF4plx2IjHfSAaXK24BiPX/AQAUaXdzGgO+QnikvJyE YQfA== X-Gm-Message-State: AOAM533U5FfEg/APzJFkLZfY4ZLu5jFisBSvV1CK8zmQabPoUWc+ftm6 mW3wKYimp1+SzySK6t+fyNk= X-Google-Smtp-Source: ABdhPJwVxRo9L4WpR4bARb+c1V+ea9O4L7NYFH2LqqvoQwP7QQE3Eju3POdetRvdkZn3Jow/cKvrJA== X-Received: by 2002:a17:90a:6b01:: with SMTP id v1mr29200238pjj.6.1633937563671; Mon, 11 Oct 2021 00:32:43 -0700 (PDT) Received: from kvm.asia-northeast3-a.c.our-ratio-313919.internal (24.151.64.34.bc.googleusercontent.com. [34.64.151.24]) by smtp.gmail.com with ESMTPSA id k13sm7207015pfc.197.2021.10.11.00.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 00:32:43 -0700 (PDT) Date: Mon, 11 Oct 2021 07:32:39 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Christoph Lameter Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka Subject: Re: [PATCH] mm, slub: Use prefetchw instead of prefetch Message-ID: <20211011073239.GA63896@kvm.asia-northeast3-a.c.our-ratio-313919.internal> References: <20211008133602.4963-1-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: AFBEF40039C7 X-Stat-Signature: g4iabzimh7mab1grir6bwnq4ehow6kp8 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XSShNGio; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf18.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.179 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-HE-Tag: 1633937564-162934 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?