Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp294636rdf; Fri, 3 Nov 2023 00:13:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4f00wmmAT+vtQejj2mj4gw0+GbBhYqh6F+thQND8mWpLKC/vlmokM/G6AWWuIjrbdKDkH X-Received: by 2002:a05:6a20:5493:b0:14e:2208:d62f with SMTP id i19-20020a056a20549300b0014e2208d62fmr2863731pzk.22.1698995586426; Fri, 03 Nov 2023 00:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698995586; cv=none; d=google.com; s=arc-20160816; b=TOT8Ac+yr7pIQM0T2owI7x6eGLvadi6yIsHlPPhkau6G4XWVmGL9sGfHk5LPkx1Vfy KzLRsFwGisdhlR7vU6QK1RLmImJR8TAnJ2Pmq4+Yg/UGt6eS6+PNXyAbQr1UTLUb37WV TobV1MaT1U9Jvu/rDSJMUlBuD1ng4OtM5jqCgTJRibrS+GONcpMqjwOut4VV+LqoDgC0 s+X/7iK4kGy0QE4CLzjWUVFQ+LPHZvB5seycJj5JnRZOR7P6366vBO29JQlHrjVoFveg nXvKR/sxmoY/p+bqSTns/n4jPbRJDFzvMVCT2i5hBIbflIqZn1cM9rXbrrFs2aJtGV6e MI8g== 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:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=P1HM4SVUCfwrimvEhhylXYef3Cf7/FaPgNpPPQsqTUw=; fh=If5si61B8QOa0J51dxCB8FjB0+xTyvQIzAj+VYhM/eo=; b=oFhQblOsqN9RNeEz2xh5GodN9PyzVj8bCrLn0FaZmJMBNLFmvz2gHHW0+PZeYf5GBj i455FpKw4FRn/7UKipuEjqqZGSVt29EqUSYxh6deXrsG/h7sJDw2lgiF7gzymRktleqX NdQYNnuY1pn3dxcAqJzSzd0xURowSkM83L+ceN231buJ/d8ze1vyetEukvp2iJg4lKo6 flrEIv6suHTZgGN1E2uqeZknQWcWWNIZTmG3R4rTfKr19I6K/ZJRdz3aIiQrvSFRb1tz WFT+SRaRuEK6bA5uwLGGLPs+e+awU7Tit5cvbiwvwOYWXb8RV1BtQMLhm5H7J5dzDb7u kn2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EOiG2iHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id l20-20020a056a00141400b00690dbd360basi1001107pfu.152.2023.11.03.00.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 00:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EOiG2iHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 733DE81F0096; Fri, 3 Nov 2023 00:13:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343889AbjKCHMt (ORCPT + 99 others); Fri, 3 Nov 2023 03:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234512AbjKCHMs (ORCPT ); Fri, 3 Nov 2023 03:12:48 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 740C9186; Fri, 3 Nov 2023 00:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698995562; x=1730531562; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=jmqohwjW/b1Gj1tSFbJgVKBOkBp3iU7UqUowR8+rmss=; b=EOiG2iHA6ysPWC2VFS/X0pIkxZO/DhpqII76iOWigBbejSUWoomh8tSF I4DMmuDp0OhadX2RNr1RrMM+d0t7A85ODkSJQy2llwr+YzCLU89aCl6cm Ak5+ELXc4YPIcvPcLG97nED+rqmuNNPze62YCk56lsjHHIGPJI2j5sphr dhCEt4UqUBsVjuMRBpsZmX6hnDw5+QQdFT2SaHs0eVV+yI6qI9+v36m5L O09oEJzR8/8uKM3Yj3fW2x3UV8PaKb7ikDA4hlY11LAGDr0KfWzBeOHLb DGcYB2tNsaijCyF3twYecHYp6mtAZUAbxa1GS8jsShbIHnF/bBwoCI3GX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="386065255" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="386065255" 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-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 00:13:01 -0700 (PDT) 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