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 04A74C433F5 for ; Sat, 9 Oct 2021 11:46:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7EF2560F6F for ; Sat, 9 Oct 2021 11:46:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7EF2560F6F 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 1A56A900002; Sat, 9 Oct 2021 07:46:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 155E06B0072; Sat, 9 Oct 2021 07:46:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01D25900002; Sat, 9 Oct 2021 07:46:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id E7C186B0071 for ; Sat, 9 Oct 2021 07:46:00 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A36298249980 for ; Sat, 9 Oct 2021 11:46:00 +0000 (UTC) X-FDA: 78676720080.17.66B2350 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by imf25.hostedemail.com (Postfix) with ESMTP id 5279CB000A6E for ; Sat, 9 Oct 2021 11:46:00 +0000 (UTC) Received: by mail-pf1-f179.google.com with SMTP id u7so10357997pfg.13 for ; Sat, 09 Oct 2021 04:46:00 -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=rcqqLB7Y82aDlnChl9Fh6u9TSmd3Zs1ZGAJ0P/xTBFZCMRrPcCgB30b6FrTm8gDMfP re9rReQF0XmtQg5kOpVwUp8FfdVPM4T69/8hL405Fmp82k1pH60zUwR7HMUyfPrUA/jW L+NUfDpM22XPbXQfHUG5XDBsfGDOgGGc3S7/1ErlS0a+SXQy+ElyWRzVsAZn9C1Acob6 5pGmTy8Fwp8Tx+V6gzLKy0Qn+iQi9DbPf0DMf7BfKEtSwOONiSsXLotWl6V5eZOCaB+U wbAxBml5lxwK0CYdOzCgxLCADxZMeU4hjYoSXmW8Tm4MjRxUYOCa6R2twFJtpbmuahrI 5lPw== X-Gm-Message-State: AOAM530jXKEomJjzbRQ2MFkAhSaWsHn8jxvntt/+A/i8lGthQSKKQX4X 6py377/f7FJjWQa4/BUEEe4= X-Google-Smtp-Source: ABdhPJzUpGIJHLSe5LXQT+edL8naF6aqdpL1qHGES3VyxqtRelb1duCUFoTsAfQGGe9ENtXWLB9Iiw== 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: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RDHhwEsU; spf=pass (imf25.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.210.179 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5279CB000A6E X-Stat-Signature: 8fmdnfurh41sk7sy6i84z1pcsgmew56u X-HE-Tag: 1633779960-243921 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 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.