Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp150085rdb; Tue, 5 Dec 2023 01:04:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOYe6b+hW4qv19XsFPI7f2KW/+K6b/04+fndfUydDfXiMcfmTFc6yhUBI0VPWWq4jWT2RP X-Received: by 2002:a05:6a20:72a6:b0:18f:97c:9262 with SMTP id o38-20020a056a2072a600b0018f097c9262mr3161371pzk.71.1701767066117; Tue, 05 Dec 2023 01:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701767066; cv=none; d=google.com; s=arc-20160816; b=paljTz1YgO2X33VJTpqRmaqxrKFDiOZhNq5lkeYLfyyEvu3AlN447JhTVCvRsSGmvq WOdwko6fuJV4jK/weJudhRWbXZz2qIEV+g5XLeEyxKYyJ3YYS1wMSWeQqL/Qaehkb6b3 dRXGYpnu6iHfgHM0X+rhRV+niB2+vVbz02Nf6clEX93BaMhGZrOqy7MwQUAM+kLNpaKw gRL9+8T/iosMHN9t+WOHya3+/vfi6/5RGtEyMOG0jeYxEDzc2QJ9FLXxPV1D07oykz7h /1dJmbCSQi5V7Y3l/aivxHHm0OT8yUULpFUsJl496uH8DbNKdcmylSdOSmRJ0wgrL5ka U5Dw== 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=JwjX9T99xgBPRxcGXnj+CAbZpEIta0hjzsol0WymO+s=; fh=Ec8+93QwXjRdnLuZ3TSm69spsYeQ+BX0TzruON84KMs=; b=wcYvh+WNxVhgAdyPrj9zAZmkYv0FYEsOAzKvCu/pAeKFQk3+gTrZuknn+cZd28QruH p3Gm1VvFszG3erkzIP2h0UIgGqq5pNxb+EtOzSTG9tvuFE/VwdZf1YQ6RdOepoCFHXhV Hp3dW+VzKd83aR1rAzp2ahoD6ohF2ViQ8DLQu6HjWab+re4rYsdOrCBFTKSDKekQLVe3 pqHO2/gcjWeSS7xU8uccKVgVFC8fwP8n7Q6GP1zyFe7k1AlWAzjvUaBFLE0+bGXcC3x6 4QmPAper13mQaMS62YO1qFgjqxsjYDtfFk+A9X2bBUwR2TwZEE4fEzxho/z8rOlAx867 lxww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VrH0qrnA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id n5-20020a635c45000000b005c5fe7661c7si4629254pgm.359.2023.12.05.01.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 01:04:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VrH0qrnA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 7CF4E801C835; Tue, 5 Dec 2023 01:04:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234955AbjLEJEG (ORCPT + 99 others); Tue, 5 Dec 2023 04:04:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjLEJEF (ORCPT ); Tue, 5 Dec 2023 04:04:05 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2482120; Tue, 5 Dec 2023 01:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701767052; x=1733303052; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=0Xoq+rJyY1UIp1LJiIIxaTDxo/bpE9rs+1q3pFVff/c=; b=VrH0qrnAymaYUoJak9mBiYADAvf3zZhqm4NDohcUL0hcofCeVkqfm4QA ghEgkru2MInK75g/01a423bam7zLDP50mQ3ZO1tofgusBkDR5pEs1/6Fg 6Ih5FUTDB09Vh49Oz0v23MrIZDxMl3SKShXVn9X86xP5rPf+mTez6hzhx 1S/s7Z7YRqS3hbupzfRO1nuktwYafuzvCViZ2CblUmSQvHmJURG+v+KIf AEKifhR+OILzzLRczX0H9hepheF2iqC4jagvUVpzAq92BCYJ8WpkN4Hnq RxYvC40jsbEpkFrYELs5BkHiSMEliB6AYWSeKz3YzeKk9HaaU+EYo806W w==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="708162" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="708162" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 01:03:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="914730523" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="914730523" 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; 05 Dec 2023 01:03:51 -0800 From: "Huang, Ying" To: Gregory Price Cc: Michal Hocko , "tj@kernel.org" , "John Groves" , Gregory Price , "linux-kernel@vger.kernel.org" , "linux-cxl@vger.kernel.org" , "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , "linux-doc@vger.kernel.org" , "akpm@linux-foundation.org" , "lizefan.x@bytedance.com" , "hannes@cmpxchg.org" , "corbet@lwn.net" , "roman.gushchin@linux.dev" , "shakeelb@google.com" , "muchun.song@linux.dev" , "jgroves@micron.com" Subject: Re: [RFC PATCH v4 0/3] memcg weighted interleave mempolicy control In-Reply-To: (Gregory Price's message of "Mon, 4 Dec 2023 08:50:12 -0500") References: <87o7fveeze.fsf@yhuang6-desk2.ccr.corp.intel.com> <87sf4i2xe1.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Tue, 05 Dec 2023 17:01:51 +0800 Message-ID: <87fs0h2fb4.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=-0.9 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 01:04:23 -0800 (PST) Gregory Price writes: > On Mon, Dec 04, 2023 at 04:19:02PM +0800, Huang, Ying wrote: >> Gregory Price writes: >> >> > If the structure is built as a matrix of (cpu_node,mem_nodes), >> > the you can also optimize based on the node the task is running on. >> >> The matrix stuff makes the situation complex. If people do need >> something like that, they can just use set_memorypolicy2() with user >> specified weights. I still believe that "make simple stuff simple, and >> complex stuff possible". >> > > I don't think it's particularly complex, since we already have a > distance matrix for numa nodes: > > available: 2 nodes (0-1) > ... snip ... > node distances: > node 0 1 > 0: 10 21 > 1: 21 10 > > This would follow the same thing, just adjustable for bandwidth. We add complexity for requirement. Not there's something similar already. > I personally find the (src,dst) matrix very important for flexibility. With set_memorypolicy2(), I think we have the needed flexibility for users needs the complexity. > But if there is particular pushback against it, having a one dimensional > array is better than not having it, so I will take what I can get. TBH, I don't think that we really need that. Especially given we will have set_memorypolicy2(). >> > That feels very intuitive, deals with many race condition issues, and >> > the global setting can actually be implemented without the need for >> > set_mempolicy2 at all - which is certainly a bonus. >> > >> > Would love more thoughts here. Will have a new RFC with set_mempolicy2, >> > mbind2, and MPOL_WEIGHTED_INTERLEAVE soon that demonstrate the above. >> >> Thanks for doing all these! >> > > Someone's got to :] > -- Best Regards, Huang, Ying