Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp351390rdf; Fri, 3 Nov 2023 02:39:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFK/A6rKXUyYuxIm5nYRwNslgeHOq0ekvFckd+fndXmqB3Lu5PCpUuGrHhF3osGFEOfd36n X-Received: by 2002:a05:6a20:42a6:b0:159:c07d:66f0 with SMTP id o38-20020a056a2042a600b00159c07d66f0mr3048101pzj.6.1699004353125; Fri, 03 Nov 2023 02:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699004353; cv=none; d=google.com; s=arc-20160816; b=FYZAjThkNfvQVAETkgWHQozBSS6ThoGxvFYVNhfi0z4D+ZfCCUqgrifZpxHRrGNXPN Xt3p/HxsdC+WabYuR54x6J+1CtVCM2izHiFALFS8q2QIab5i80mrHV+jstqbVALV7EBl NNl3Y1EAfnr1rkUKQOsBJuI0HX1tl+zlYwjmxrvzlxsT12t//b0isWjSXfpHDBWA6qTK p/ArMmXb70UaEMKLiJAc84iRS1dzNGQ0UIEp7eOi0FTmoi6ri6HGE2gpLBv8aOt8R7Zh WA37JeKzECyK5doIJnyGriybw0+a16csKceYqmL9BW7KN24Buo5kOXnbhWSzSU8WUZ26 EYRA== 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=d4jQ1t6Qttv+buPxaS9aV1Pqc3DF6sKVx91vpC38npY=; fh=h+Cf7dun7GC7pP7X5IsNYluy+2OLdgYH+37Z6EPuCag=; b=pxzFWaka1fthwOY8B/a2V5+3EcSPTMhxyr00Zvl3Ac68Af0y5cWRWCK/Cm12WmzL4s XDn8uyPMgzyKE5CWjpFSpzDO0uaV1NxvfPgfYxPDKb1rh0LZEbHhVyYp3dj5JV1/96yL ofevT6qIwDbT5s6f5L/MKV1uM24xf5nrkOtZ1RHxMs/EatVlrajWIP6JHgrgbshbTfoQ k/NBeK2JcOZ0pH7Uf+uSAlZ+Bd/nGXjtZcJj0hWwjE/1y7yE8UljMlD3kJnjVeArGYmX nckxU/XYEki1sUoDLMj/44eJpy8FwYGbtBlO3ia+bWTg7vBNi/tokgeLf1hIz+pWB2uI OMUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=rN1523AA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e15-20020aa78c4f000000b006bd5d6f7c71si1187937pfd.390.2023.11.03.02.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:39:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=rN1523AA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 23A1683896C8; Fri, 3 Nov 2023 02:39:12 -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 S1347246AbjKCJjK (ORCPT + 99 others); Fri, 3 Nov 2023 05:39:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347238AbjKCJjJ (ORCPT ); Fri, 3 Nov 2023 05:39:09 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417071BD; Fri, 3 Nov 2023 02:39:03 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 707481FD65; Fri, 3 Nov 2023 09:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1699004341; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d4jQ1t6Qttv+buPxaS9aV1Pqc3DF6sKVx91vpC38npY=; b=rN1523AAByVvwQQ/Qv9+31L7Z+WHkVB7hPMA096juan6k4125M0ZQOhzSO7JZhqZMrZ1JS pFxT/lA0OJTUYGlaY1TNJ48TlWQcrVj/cDTMOytZZDztDCgBpTpSkgRd5yFDZHnBab6FTK cGuwQvdUA8Ofc+FocFMkm6rdt2ZHQvA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 51D3F13907; Fri, 3 Nov 2023 09:39:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2sE+EbW/RGWqewAAMHmgww (envelope-from ); Fri, 03 Nov 2023 09:39:01 +0000 Date: Fri, 3 Nov 2023 10:39:00 +0100 From: Michal Hocko To: "Huang, Ying" 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 Message-ID: <2i3awgkx2i4a5op7rtcqzv4yub376l66tevfvlyccf6wrjia4v@5x4ar4f6i5eh> 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> <87jzqzz502.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87jzqzz502.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, 03 Nov 2023 02:39:12 -0700 (PDT) On Fri 03-11-23 15:10:37, Huang, Ying wrote: > 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. Bad wording from me. Sorry for the confusion. Sure those are two orthogonal things and I didn't mean to suggest a single API to cover both. But if cgroup semantic can be reasonably defined for the usage enforcement can we put the interleaving behavior API under the same cgroup controller as well? -- Michal Hocko SUSE Labs