Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3735943pxm; Tue, 1 Mar 2022 04:36:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrQUFnTUVfv8/J7LmcAKH4iK0wurcwCh9OaOOOaC1eOig0/euTs9rSsFhZJFHmLjuzfInr X-Received: by 2002:a17:906:a10:b0:6ce:7107:598b with SMTP id w16-20020a1709060a1000b006ce7107598bmr18386840ejf.653.1646138195725; Tue, 01 Mar 2022 04:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646138195; cv=none; d=google.com; s=arc-20160816; b=d5yYuSgpcRNiXfj1XKfg//tIv0u34sEKqKPzo8D+pWa25bL3Y9HN+HPAFF+25Zt6V5 mZ8ALVR5l/qXz9pZgqLPsmPP4t76XH3ea/oSpEOoLozle5U3wAOVOVUYYwK84z5LNeCV iyP25FcsJXmNY1d33IYE4nCB9sE0uMhFDqIT34ys+JFFpaUKCKbyktq9dYaxFHf7d2Oa Z4vRkcs9pUsiq0DP0VgvngELBPWy9kJuPYOSrD3LxOdBdAYCiIzFeMC82kQ9REleWNAU UqcSyonVgdjef1drvPzJweg/cfJdP+xQ/5Xkqpgo9Ht7/MnYGBcfbZE9vGGoqDvg5l7K Dk2g== 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=VYJHUH0IgdfnLKYKC3tcsTkSw2HdASrxxZkAzWZIFtM=; b=CBhmV8LxVOSPeXY203r3weZmOTO8JPrARWIzd11qACIFitleuSSjZ7uMm0eedn4oVy BMNpBBjomfEWNViabPSMyEb2R35FTr1cz9vHEJ8QV7dWbdOsKgNmUZLbM2PqIHRhvSp8 L5vZrmKrbAQOSc0YBZ/+6b2h2vM8XlyxRMvO5cCsbeUOvNG/9eRlupAmQOJ1Zf1cOVe1 3S1uLGSxL+E05ZJpbuESseXgHlK/8FV1EhxxG26BVawMliDteN7x0eM6qUeo/s0E8QFA Yo6ZzxCohohmKHYvjtLpVkuy0+9UcnwtFf0mk9K5+aV5HkSg32tQoSHU7B/cvwmznTo1 yfbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AAxssDfa; dkim=neutral (no key) header.i=@suse.de; 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 j25-20020aa7de99000000b0041086c885b9si7992899edv.392.2022.03.01.04.36.12; Tue, 01 Mar 2022 04:36:35 -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=AAxssDfa; dkim=neutral (no key) header.i=@suse.de; 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 S231618AbiCAGT0 (ORCPT + 99 others); Tue, 1 Mar 2022 01:19:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230488AbiCAGTY (ORCPT ); Tue, 1 Mar 2022 01:19:24 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE61433AB for ; Mon, 28 Feb 2022 22:18:43 -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-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-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 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