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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7A25C4167D for ; Fri, 3 Nov 2023 07:12:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 489A028000D; Fri, 3 Nov 2023 03:12:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43ACD8D000F; Fri, 3 Nov 2023 03:12:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3026228000D; Fri, 3 Nov 2023 03:12:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1CC488D000F for ; Fri, 3 Nov 2023 03:12:46 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E0ED51203C5 for ; Fri, 3 Nov 2023 07:12:45 +0000 (UTC) X-FDA: 81415775490.06.C77C39D Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by imf09.hostedemail.com (Postfix) with ESMTP id CB61D140006 for ; Fri, 3 Nov 2023 07:12:43 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BKUe4GeN; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698995564; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=P1HM4SVUCfwrimvEhhylXYef3Cf7/FaPgNpPPQsqTUw=; b=pTvx9z4UTtxV7QPBF0NidrxPdjIrtt8nhti8WrAsCl3tt/p5NOxYDgXFiw7PmNW86PaaT5 jJctIY8a0ve+zSriHgZo1zhn8Try4JcRxY6yVnOmUZTQPCiPCEH7sPBOKgNCWP4d+t2WLe KmyYpuJPf3DuqLJW2lfIhIOrpGFbwik= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BKUe4GeN; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698995564; a=rsa-sha256; cv=none; b=7qkeTf/ULqs89JHKZZ/1SKnzSkaoI7MMP1/iBmMMs7+Db65Yx5mAloDoVWx/iVatjYKD5y LAAkSLebbrPTioAgAVYrHXcj+wbkjn6K6a5phyPhSUvT//pkiitWHh2R6NIVhNRCm5mm7f YrPY55G/h/gDZ/Fwzk5SvWmXjCyphyQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698995563; x=1730531563; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=jmqohwjW/b1Gj1tSFbJgVKBOkBp3iU7UqUowR8+rmss=; b=BKUe4GeNeUIch1GI4Rj4sX0uCU6lMjAhL2rgHk8k2gJex24Gym46CDim uzEo9sjnxaob0Awt7PmsNEh1Wk9xIYo9b1/UyQMAhgwAHKkGGSwQ0zvWK kyOSGkBxRiMpANbGtdUyRC4cKrZcscUn23CY0EP5h5EbQigbTcXeSsC88 yUoqImEMtAtWKf501oyD3amcX+CTOTHOvMErwG4+/XLRrJkN7v1B+ErAV lwnL0Q/WCV3gCRgQX6oHh0gUrm/ou1T5S2nvDh2B0v6SHaDntxy9iRIpE WRb2roU4AiNnDykdwdcsWqC+BBJgCWrsjx43Yprl8LRnHv5PMTelcsW4a g==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="386065258" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="386065258" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 00:12:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="905256191" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="905256191" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 00:12:38 -0700 From: "Huang, Ying" To: Michal Hocko Cc: Johannes Weiner , Gregory Price , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, weixugc@google.com, apopple@nvidia.com, tim.c.chen@intel.com, dave.hansen@intel.com, shy828301@gmail.com, gregkh@linuxfoundation.org, rafael@kernel.org, Gregory Price Subject: Re: [RFC PATCH v3 0/4] Node Weights and Weighted Interleave In-Reply-To: (Michal Hocko's message of "Thu, 2 Nov 2023 10:28:11 +0100") References: <20231031003810.4532-1-gregory.price@memverge.com> <20231031152142.GA3029315@cmpxchg.org> <87msvy6wn8.fsf@yhuang6-desk2.ccr.corp.intel.com> <87il6k1y82.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Fri, 03 Nov 2023 15:10:37 +0800 Message-ID: <87jzqzz502.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspam-User: X-Stat-Signature: 6x8cfiams5w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QQexOXZ9bvrxqu4TFbYfhGiULu9uQpUMVteStmcloqzJQkBTTZWWlhr+p4ULEYg1tymaYMXRyJFxVtiJljsYCzw9zCAwSfVCvj2Ue4K3e9SQASk3Dj4+5LwcyhY5BXqfqMTIW1J4ck7PhF+BOIp4nB59j5pOK31JV26sZ2ffFgekPxiBeH3Mt5XwIKPUPKF0Lr1u6rzrJR9DpilwciJYshhPqxqSKr78frIL9GbKU58XdlLkvKtafRv2egiSkjNijclVDbNco7yR90WIt374KlSQLged/nCYnQyO/6iRe26an4Wmu5qTp+qZNuHZkHhuAy84GydhnU19P8UDNGgQJWcr0MPidZR8= 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: List-Subscribe: List-Unsubscribe: Michal Hocko writes: > On Thu 02-11-23 14:11:09, Huang, Ying wrote: >> Michal Hocko writes: >> >> > On Wed 01-11-23 10:21:47, Huang, Ying wrote: >> >> Michal Hocko writes: >> > [...] >> >> > Well, I am not convinced about that TBH. Sure it is probably a good fit >> >> > for this specific CXL usecase but it just doesn't fit into many others I >> >> > can think of - e.g. proportional use of those tiers based on the >> >> > workload - you get what you pay for. >> >> >> >> For "pay", per my understanding, we need some cgroup based >> >> per-memory-tier (or per-node) usage limit. The following patchset is >> >> the first step for that. >> >> >> >> https://lore.kernel.org/linux-mm/cover.1655242024.git.tim.c.chen@linux.intel.com/ >> > >> > Why do we need a sysfs interface if there are plans for cgroup API? >> >> They are for different target. The cgroup API proposed here is to >> constrain the DRAM usage in a system with DRAM and CXL memory. The less >> you pay, the less DRAM and more CXL memory you use. > > Right, but why the usage distribution requires its own interface and > cannot be combined with the access control part of it? Per my understanding, they are orthogonal. Weighted-interleave is a memory allocation policy, other memory allocation policies include local first, etc. Usage limit is to constrain the usage of specific memory types (e.g. DRAM) for a cgroup. It can be used together with local first policy and some other memory allocation policy. -- Best Regards, Huang, Ying