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 EE450C433F5 for ; Tue, 1 Mar 2022 06:40:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BB988D0002; Tue, 1 Mar 2022 01:40:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 66B468D0001; Tue, 1 Mar 2022 01:40:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 581648D0002; Tue, 1 Mar 2022 01:40:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id 4702D8D0001 for ; Tue, 1 Mar 2022 01:40:53 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 070429CD53 for ; Tue, 1 Mar 2022 06:40:53 +0000 (UTC) X-FDA: 79194869586.30.6D291EE Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf07.hostedemail.com (Postfix) with ESMTP id 14B1240003 for ; Tue, 1 Mar 2022 06:40:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646116852; x=1677652852; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=sTdaEj+CJ6VXmMzCvIX4ApOCddLE+v7WPcrPQ46FEzc=; b=mSGvg+cKWCaBwZczPhdPxJ7cqB+RpXB4jR9X40Kd671V2PPTkw4liQ/2 W923CTpBNxHzJgZeMzRJaizaZ15xpuFYcpdL8RlbxE46JI1Mlbt8xGjcB 8U4oP4LlBRqMeKmjQW348m1KKQUdiuVFDxlNVn5TPuNKkeiEAl15Kpglp 4w3x2qpMx5gcin/xqj1jUb0FEcuTw/6TQgCIjWvmpQ1D3ascMsXavF4eD DatCsTxtc2q6hMZy2AD6aBXew/NBl2yBRkij/SiTniAVTmQgVmHaR9aH5 KNSzihs2hNPHlWaAycxbc0rHsqvhHhbcWnjlhk/i28Gkjn1retz9tmm09 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="236579521" X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="236579521" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 22:40:50 -0800 X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="510400803" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.13.11]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 22:40:46 -0800 From: "Huang, Ying" To: Oscar Salvador 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 References: <20220221084529.1052339-1-ying.huang@intel.com> <20220221084529.1052339-3-ying.huang@intel.com> <87czj6321p.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Tue, 01 Mar 2022 14:40:44 +0800 In-Reply-To: (Oscar Salvador's message of "Tue, 1 Mar 2022 07:18:39 +0100") Message-ID: <878rtu2n0z.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 14B1240003 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=mSGvg+cK; spf=none (imf07.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: rfbnkuqmw6y9tpjranm7f636b4h1sz6f X-HE-Tag: 1646116851-449448 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: Oscar Salvador writes: > 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." Your version looks better. I will use it. Thanks! > But I am fine with your updated write up as well, so if you spin a new > version: > > Reviewed-by: Oscar Salvador Thanks! Best Regards, Huang, Ying