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 A445FC433F5 for ; Tue, 1 Mar 2022 06:18:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC51E8D0002; Tue, 1 Mar 2022 01:18:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E73BF8D0001; Tue, 1 Mar 2022 01:18:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D938D8D0002; Tue, 1 Mar 2022 01:18:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C6B318D0001 for ; Tue, 1 Mar 2022 01:18:44 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 358F29CD53 for ; Tue, 1 Mar 2022 06:18:44 +0000 (UTC) X-FDA: 79194813768.26.EC45736 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf22.hostedemail.com (Postfix) with ESMTP id A49A3C0008 for ; Tue, 1 Mar 2022 06:18:43 +0000 (UTC) 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 339B61F37D; Tue, 1 Mar 2022 06:18:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1646115522; 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=VYJHUH0IgdfnLKYKC3tcsTkSw2HdASrxxZkAzWZIFtM=; b=AAxssDfaKg+Vh+dvy85Lm9NNR4J8ET0z2mgaPAnINymAiB3UiSwmszyLlDz8m4mz1qbTF+ Jaw0VeJixqh0rg8L2VgliVxFCC4dZLfiBoGtBbQZQFZXInwryTKBKmGW3smqWg9H/cuhzy 9tPShcFvBgQsWBIqMAO+7hv/zMCCwG0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1646115522; 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=VYJHUH0IgdfnLKYKC3tcsTkSw2HdASrxxZkAzWZIFtM=; b=boAWlaocpff9pi8AIuLcWTsCXT+E901Zq6CIQqYaC+hbJYB0BFi2eQCyV19LphSjJGjs84 +duKdRJk1VaQp2AA== 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 DEF1F139EF; Tue, 1 Mar 2022 06:18:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CuodMsC6HWLvEwAAMHmgww (envelope-from ); Tue, 01 Mar 2022 06:18:40 +0000 Date: Tue, 1 Mar 2022 07:18:39 +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> <87czj6321p.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87czj6321p.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: A49A3C0008 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=AAxssDfa; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=boAWlaoc; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf22.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de X-Stat-Signature: a4swr9c3rkzdewb3thmra1ypqnorbw83 X-HE-Tag: 1646115523-465768 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: On Tue, Mar 01, 2022 at 09:16:18AM +0800, Huang, Ying wrote: > Hi, Oscar, Hi Huang Ying > 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). If we want to promote some hot pages from the slow > memory to the fast memory, but the free pages of the fast memory > node will become lower than the high watermark after promotion, we > will wake up kswapd of the fast memory node to demote more cold > pages in the fast memory node to the slow memory node firstly. 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. What about this? Somehow it sounds clear to me. "b. Define a new watermark called wmark_promo which is higher than wmark_high, and have kswapd reclaiming pages until free pages reach such watermark. The scenario is as follows: when we want to promote hot-pages from a slow memory to a fast memory, but fast memory's free pages would go lower than high watermark with such promotion, we wake up kswapd with wmark_promo watermark in order to demote cold pages and free us up some space. So, next time we want to promote hot-pages we might have a chance of doing so." But I am fine with your updated write up as well, so if you spin a new version: Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs