Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2656169rdb; Fri, 22 Sep 2023 05:15:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfd5pdsRbYzcvsVECRErkYTV17nDoLU68EZjFGVAhTCfFVZH/X852jgv4P9CW7/XeKr39+ X-Received: by 2002:a05:6358:7015:b0:143:4d08:b9d7 with SMTP id 21-20020a056358701500b001434d08b9d7mr6053753rwo.3.1695384925214; Fri, 22 Sep 2023 05:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695384925; cv=none; d=google.com; s=arc-20160816; b=sKTZHGqWTD+SavdTOIPR7TDwVSL6FmUhMR0hsDv5XZQAzgnySL7Pbei/7IQ2DiH18b c4hFyU7sbg/MBWCdrc2PoOPT0HpXRtdSV17qsf/3nX70lkvPfmrF1qpf2hZf3SjI3nxY F35MXlC8tEHweMPkIqnkfdP7l/Io5RPgYnmyZQNTNKxSmKNJ1AXUcPIixvWd9/uLaOeN Zk68SKXFkNeWo2JIoKfpprOlEM15N1A/e/hVL/vhLdXYc7HawzeAnZWm7WtIWO13dWR4 hZOJEdc8bLS1O22OE9ZKowdbUAxzRf8dy2b7rPbKZxkeGr91tZQYXiXsXgXTriLMmSAE aPQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=HdgZOD/M6+/1PjleXDBg14Lli1iyHTJggPnPdoKOQDk=; fh=Lk06RqLNm4SCet+3dUMeSl3ayTLt0b7q2hsu3kWrI7c=; b=oYUPS6lS/1XE/QCqV9qRt3lNd/DJ0d6l3rfkB3SLEj1pUCfpPHyGv0qo9z6jbyyRrM VSOv+OQfCgJ+nnOv/V6juKyFLJyU6/bGSvD1DuZ8K8EXtUfvrZPmc/MbY1lOpLqu+nXI D5h3+KQN3QT05WPOct2sI1G7B73Qc2bnkUgguR1tgMvrhtNSYDz/oUxcw1B+fERXXMlD hirpeWHWXNnYsCVGglCt49c1ApkVRe8BZeuWnks69l8yY75cdPItHz1CX1scM0b2Xh18 H9a8gVQSqUWZCIoCGgqy9TUK2wuth3jlSRzIFx4fSlGYsY8T8RaC0TQuvGbahv4HvJXW QWAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kRBvTbuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y63-20020a636442000000b00578e4816c9asi3782016pgb.19.2023.09.22.05.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 05:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kRBvTbuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 37C6982A38F8; Fri, 22 Sep 2023 00:58:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231902AbjIVH67 (ORCPT + 99 others); Fri, 22 Sep 2023 03:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbjIVH66 (ORCPT ); Fri, 22 Sep 2023 03:58:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 460C183 for ; Fri, 22 Sep 2023 00:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695369532; x=1726905532; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=VSgEQk+bSFEoNsLLa87F/gjR0Fg53115/l50nZmCo7E=; b=kRBvTbuzTvSsjZ7xWP8B6XSgToddMq2r7+3ETynzE6sACOgiPZ8g8psq fK+T2OrMvypVxGxZyfmRY2YxdNaw0NR2fZGNbBosoKFQKd+JBVq5jZHOO +ZsfRz57SJtfrC5j/+3FYAHqJOZr/zESlSn6m3BISYAEmKDBqxxsTsocJ t7pM0pxCIgDIIOyVAQQsAJzG9FBrSuUbQsGmDeP1p8nz1BEud50dJcDeX UFoz6n9Q6KEVJJfqHqr+5LAO0+J+x2IYrCL7dWoq9bPmqRBNQ3W+/uMfD uxsxMhs+2gVoq3sxE+Xh3mOVu3MXw57+V73NpmY9dhoJysi+ZGPTvy+PX g==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="361022400" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="361022400" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 00:58:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="817692142" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="817692142" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 00:58:48 -0700 From: "Huang, Ying" To: Sudeep Holla Cc: , , Arjan Van De Ven , "Andrew Morton" , Mel Gorman , Vlastimil Babka , "David Hildenbrand" , Johannes Weiner , "Dave Hansen" , Michal Hocko , "Pavel Tatashin" , Matthew Wilcox , Christoph Lameter Subject: Re: [PATCH 02/10] cacheinfo: calculate per-CPU data cache size References: <20230920061856.257597-1-ying.huang@intel.com> <20230920061856.257597-3-ying.huang@intel.com> <20230920092402.pvqju4knnqkzqfiq@bogus> Date: Fri, 22 Sep 2023 15:56:41 +0800 In-Reply-To: <20230920092402.pvqju4knnqkzqfiq@bogus> (Sudeep Holla's message of "Wed, 20 Sep 2023 10:24:02 +0100") Message-ID: <87cyyawshy.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 00:58:56 -0700 (PDT) Sudeep Holla writes: > On Wed, Sep 20, 2023 at 02:18:48PM +0800, Huang Ying wrote: >> Per-CPU data cache size is useful information. For example, it can be >> used to determine per-CPU cache size. So, in this patch, the data >> cache size for each CPU is calculated via data_cache_size / >> shared_cpu_weight. >> >> A brute-force algorithm to iterate all online CPUs is used to avoid >> to allocate an extra cpumask, especially in offline callback. >> > > You have not mentioned who will use this information ? Looking at the > change, it is not exposed to the user-space. Also I see this is actually > part of the series [1]. Is this info used in any of those patches ? Can you > point me to the same ? Yes. It is used by [PATCH 03/10] of the series. If the per-CPU data cache size is large enough, we will cache more pages in the per-CPU pageset to reduce the zone lock contention. > Not all architecture use cacheinfo yet. How will the mm changes affect those > platforms ? If cacheinfo isn't available, we will fallback to the original behavior. That is, we will drain per-CPU pageset more often (that is, cache less to improve cache-hot pages sharing between CPUs). > -- > Regards, > Sudeep > > [1] https://lore.kernel.org/all/20230920061856.257597-1-ying.huang@intel.com/ -- Best Regards, Huang, Ying