Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2930837pxm; Mon, 28 Feb 2022 08:45:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV1rsC1r8vHsvHrr7z5nXwwD+/MFivrQJQT+se7FbA7rX2eDlXmn0UNCrwfa3S87qSImPo X-Received: by 2002:a17:906:7852:b0:6ce:88f5:4dc9 with SMTP id p18-20020a170906785200b006ce88f54dc9mr15906830ejm.491.1646066742523; Mon, 28 Feb 2022 08:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646066742; cv=none; d=google.com; s=arc-20160816; b=mA+RoC61bzT9JoBp3VSDVNb98M4OO4ppb8l3qxkNXhqDkh9+2X4NMTVhwePPB9vFWX esYYwo5aSdlC330Y3n0Frt+mPd8RuqhsSBYE2ZNywHpOW2PEKYA5hf+KU+8bmcVp89RA pmpiG2JNCrqq7nFAoi14nDr5n0kM5EdPJgAE4eWahLcaLRAh5D38XtM+lBryASAK/Eip cdipp9omGzkyLuEyC2ca7IGyRFfXO8DQpIcLjcRv/Jb1HG8JJqqfM0q1d5DwMXDcL6am MYEdYFwMkhRo6t9xn+mGDreGYWFLLNYQrjJ8dtM2X32j/jFU1NjCEcvvP2mnfY+u4ILI ZFuw== 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 :dkim-signature; bh=zVRCJf7zWHZzY2nfFgkpXiT7Br9L3lNouIbRBf2LbLc=; b=hhQvyzfPcLLoRgNVVAgBSC7fbuGLlAWVhLvpTwbvlmsts67r97kzSjoNnMaWg6tQ6m 8s3DeFjWNm5mSd5UNtaUR425VYwG5FmxPYk2Bs+3ZP0VdLbftKiXLqOrVU27OD2i2VnI hgpFS6g/yGxZbE20JXfXGI4U9/kMFXpKOw5oWjhG7K4YtI+jd+TzziQu1WsrJLzb7wZL huljjvWmDqCNnYBaDKVS0XDbzXyghgDKST+c4Ils031HCxbJ7Uzqs8SwAWj/ia6TfVr0 wv0avr/f4UVIzj3PXmlY/psXgg5Bwj+hh/7hdStEMIhgAsBeSVMBCf8GrkvWTjkdaeH3 2neQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=iK8F0uqr; dkim=neutral (no key) header.i=@suse.de header.b=VxyOKdNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u20-20020aa7db94000000b00410b07efc3csi6576383edt.350.2022.02.28.08.45.19; Mon, 28 Feb 2022 08:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=iK8F0uqr; dkim=neutral (no key) header.i=@suse.de header.b=VxyOKdNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237667AbiB1PzU (ORCPT + 99 others); Mon, 28 Feb 2022 10:55:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232330AbiB1PzS (ORCPT ); Mon, 28 Feb 2022 10:55:18 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A188526106 for ; Mon, 28 Feb 2022 07:54:39 -0800 (PST) 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-out1.suse.de (Postfix) with ESMTPS id 31566218BB; Mon, 28 Feb 2022 15:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1646063678; 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=zVRCJf7zWHZzY2nfFgkpXiT7Br9L3lNouIbRBf2LbLc=; b=iK8F0uqrxoBBMPClQF1HDAV9OghJKvD0Ri6MeQfjtQHkvcCujif7fyZYNZo54LEBH+SMew QXNrERmjodXTK8xTnZEDNE/fp/pP7utSKdKlFIVdzR8heNCfPBXBR3CpGl7k6UfHgm/O9K qhdETDFdgKeG8DWKfPKE+ll1a6Iirk4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1646063678; 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=zVRCJf7zWHZzY2nfFgkpXiT7Br9L3lNouIbRBf2LbLc=; b=VxyOKdNNag/xVoTtys+9IAojlmZhFBbJv/LAyDKEAGATEhKeEpRZjFbKClUCLYCNTliEPA 0TIQ7fZ/Wf8g//Cg== 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 2625113C68; Mon, 28 Feb 2022 15:54:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AJ1fBj3wHGInBAAAMHmgww (envelope-from ); Mon, 28 Feb 2022 15:54:37 +0000 Date: Mon, 28 Feb 2022 16:54:35 +0100 From: Oscar Salvador To: Huang Ying Cc: Peter Zijlstra , Mel Gorman , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Feng Tang , Baolin Wang , Michal Hocko , Rik van Riel , Dave Hansen , Yang Shi , Zi Yan , Wei Xu , Shakeel Butt , zhongjiang-ali , Randy Dunlap , Johannes Weiner Subject: Re: [PATCH -V13 2/3] NUMA balancing: optimize page placement for memory tiering system Message-ID: References: <20220221084529.1052339-1-ying.huang@intel.com> <20220221084529.1052339-3-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220221084529.1052339-3-ying.huang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 On Mon, Feb 21, 2022 at 04:45:28PM +0800, Huang Ying wrote: > b. Make kswapd of the fast memory node to reclaim pages until the free > pages are a little more than the high watermark (named as promo > watermark). Then, if the free pages of the fast memory node reaches > high watermark, and some hot pages need to be promoted, kswapd of the > fast memory node will be waken up to demote more cold pages in the > fast memory node to the slow memory node. This will free some extra > space in the fast memory node, so the hot pages in the slow memory > node can be promoted to the fast memory node. The patch looks good to me, but I think I might be confused by the wording here. IIUC, we define a new wmark (wmark_promo) which is higher than wmark_high. When we cannot migrate a page to another numa node because it has less than wmark_high free pages, we wake up kswapd, and we keep reclaiming until we either have mark_promo pages free when NUMA_BALANCING_MEMORY_TIERING, or mark_high pages free. Is that right? Because above you say "Then, if the free pages of the fast memory node reaches high watermark, and some hot pages need to be promoted..." but that should read promo watermark instead? Am I missing something? -- Oscar Salvador SUSE Labs