Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3206705pxb; Sat, 9 Oct 2021 04:48:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ5BQhFi/WmNaFyCJbIiOEMrmbh7JiYNJixMqnZypkR8meEG7kxVL7Q9sJiD3dGVFSlpc/ X-Received: by 2002:aa7:9287:0:b0:44c:767e:4e71 with SMTP id j7-20020aa79287000000b0044c767e4e71mr15055755pfa.76.1633780089880; Sat, 09 Oct 2021 04:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633780089; cv=none; d=google.com; s=arc-20160816; b=b/E/vs+LQRX79SkhJoec7RrveJlqFYUfyVpz3E4r1RM9X8FdiexfhRjqMnlp487rfb 5fB+f5dQCvQ3pBgq64YqW2Al8SdgzugtWaSD04KUBHPEYnFNLbEryxHd49wc5dCaJY6J QLpptLpb3+l8ZgKkFMbcUS2+hZRdVbxwEDvTR0coCUK7tjCNcl3gZTz2mM+xLpksgOAJ fMYDQsabkDATk9DP/ot3v7tJdRBp6pHMREDYu1/KTqLtKh/mDludBtJtJrlI7vOuuh1E BizA1M0n19eyD12aaWG9sVwWRLSIqlPiyA/Lr9C0oRpSLG2q4UNkU74rLXriyhZLLd7p hL6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ujYwsHZBVmm5oLHlnTuLYoOEg7HetCPfsuEX8hVwybI=; b=SKMKfPf2M48sLh72N90nphRXYmRZp/0F2BfK2rHNyS6XpZLwpI9r7BCdzMQp6URS87 XHMzSWt1FJeQnZYcndju+FjmWDIibc1iPfEFtIT9bWgw4WOrqqty6uHgzXIQFEodsTcv uAVylH3MQ9yvO01f5wHGh22a3X0SZVV0gZpVOU0pqo8s6adktXtE1+eDO9O22Ac7wuB3 UA8gaqbc+8iW+c5ROi4Bgun970+3+ru3avYAi71reeJwyHRjtIiWiAkDacLo1UIp53QN eK9/7jZ08Kcw7l6pMSmslZsE1E+axPLmqP19B6DAOBsn9pJRj6gCLsamcxv2+NlvQExg mZPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RDHhwEsU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si2169055plc.80.2021.10.09.04.47.56; Sat, 09 Oct 2021 04:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RDHhwEsU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232960AbhJILr5 (ORCPT + 99 others); Sat, 9 Oct 2021 07:47:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbhJILr4 (ORCPT ); Sat, 9 Oct 2021 07:47:56 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0AF8C061570 for ; Sat, 9 Oct 2021 04:45:59 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id e7so5795521pgk.2 for ; Sat, 09 Oct 2021 04:45:59 -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=ujYwsHZBVmm5oLHlnTuLYoOEg7HetCPfsuEX8hVwybI=; b=RDHhwEsUU16yULlbcS1WddwhWb8KlvE/Gnly0OqJeOiz6JZxhi1/kQwgMyDgC6YPmS WHjzC3NAM2bCODu2MyUhaQkAX+HTqQDTZcJ+PFvwC/xn8kDpV2bcSSsIy3I1HM+jeIvl fxl9jn1JmqU7l68jO/NXVVW7G3m6laEQC3RORKgNdx7d8EesFqSgG++aOyRWX/W71K2z SatkSba+0D9b582J+3+1ArJ7Nwk/e7UinmbSzoaNjUrzFy3c99FaIeGJ/REHpW2frF74 OerhiScWCz8htuxmJ+NwMsEcPPJOuAWpZx0ibbNrSA5mBe/4TcMULchyBO/ZNvnE0GkJ YOBg== 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=ujYwsHZBVmm5oLHlnTuLYoOEg7HetCPfsuEX8hVwybI=; b=m6GR/0kqGwELZlovHBi+nO32vOmP+mJTHjilRe+RUfe5ePDZwL++xGlaoRhdhlAIk2 6fLaWZzi+MSfOID7BXJ+y2UbUKAKMWpuQntgRG0MEKN8aYaLuMbLOaJt1Y6SAexk0nsl sqsJlVSdYsytaBTFLyQKt4b31/DaQWs9eewH7eej4fzJ1APGPPDLjydFBpmh9QHPrUjs +vcY0Sy3CW68lRaRGZhWOn/Ri4O9et8UNU+X8Br4CwvGasqO4ZgxEQZY8m8OShDdHtXc xsmSbfOIFaVFA30Vu5kHaDs/ZwMsCThrHlBg1UsGwbYjJjpgl69XGNJ77ncCq26twPyC gsfg== X-Gm-Message-State: AOAM532uHydRmreKvh4OQLSYpgAEqPQ72k2EyG43ayM2E/PrtYNtG7/g 0ii5JwH8FEcz+q5dpYDiWFc= X-Received: by 2002:a05:6a00:10cc:b0:44c:852:41d8 with SMTP id d12-20020a056a0010cc00b0044c085241d8mr15502380pfu.54.1633779959339; Sat, 09 Oct 2021 04:45:59 -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 s2sm14562353pjs.56.2021.10.09.04.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Oct 2021 04:45:59 -0700 (PDT) Date: Sat, 9 Oct 2021 11:45:54 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka Subject: Almost no difference Message-ID: <20211009114554.GA8165@kvm.asia-northeast3-a.c.our-ratio-313919.internal> References: <20211009001903.GA3285@kvm.asia-northeast3-a.c.our-ratio-313919.internal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 09, 2021 at 01:33:43AM +0100, Matthew Wilcox wrote: > On Sat, Oct 09, 2021 at 12:19:03AM +0000, Hyeonggon Yoo wrote: > > - Is there a reason that SLUB does not implement cache coloring? > > it will help utilizing hardware cache. Especially in block layer, > > they are literally *squeezing* its performance now. > > Have you tried turning off cache colouring in SLAB and seeing if > performance changes? My impression is that it's useful for caches > with low associativity (direct mapped / 2-way / 4-way), but loses > its effectiveness for caches with higher associativity. For example, > my laptop: > > L1 Data Cache: 48KB, 12-way associative, 64 byte line size > L1 Instruction Cache: 32KB, 8-way associative, 64 byte line size > L2 Unified Cache: 1280KB, 20-way associative, 64 byte line size > L3 Unified Cache: 12288KB, 12-way associative, 64 byte line size > > I very much doubt that cache colouring is still useful for this machine. On my machine, L1 Data Cache: 32KB, 8-way associative, 64 byte line size L1 Instruction Cache: 32KB, 8-way associative, 64 byte line size L2 Unified Cache: 1MB, 16-way associative, 64 byte line size L3 Unified Cache: 33MB, 11-way associative, 64 byte line size I run hackbench with per-node coloring, per-cpu coloring, and without coloring. hackbench -g 100 -l 200000 without coloring: 2196.787 with per-node coloring: 2193.607 with per-cpu coloring: 2198.076 it seems there is almost no difference. How much difference did you seen low associativity processors? Hmm... I'm gonna search if there's related paper.