Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3535548pxm; Mon, 28 Feb 2022 23:38:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxT4pLkAHuG8ii2SKjm0Rn6PNTpK7YasocTLxFvzjXvvaThf+anOQwNjxWz42RDXBhNnRlL X-Received: by 2002:a17:90a:4289:b0:1bc:275b:8986 with SMTP id p9-20020a17090a428900b001bc275b8986mr20593617pjg.153.1646120335017; Mon, 28 Feb 2022 23:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646120335; cv=none; d=google.com; s=arc-20160816; b=xWlbHrnEOS8NDui8XMqjpMC/iX9Ia4WXRgo/4vSLUAIAgfKYnxTVfEpVrZibX/waIH KGB+f2Z0e29Ue2oTmMHt8vbAKvLyefJQVLARRSGd/JWScvgxal3wvRNSiM7tT/sUGfOA DC26ox6lvsc6DFmLuylOACPCvvI8E0XwW39AQCB2lJsKwHNu2oe1rll62HHgLqnzNRWd +8p3n8EO8VNcUQPbimg5c1QuqTuUfzttpqKeSaZRR2uiAnKWXbXChoUP/aBNpA0ivAZy lG/0FHbjkDwtS5g/evTsTIdExYKUvduqPaghXtfcC419fvW6tAc9k3HQN7anaguKLbdy 0EmA== 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:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=gDIjkt5147VSYcajtdHLMjrHb2goPxoVCWAwlPqrmP8=; b=yHzuDH0xUae0MyMj0zbxvN2keyrEFbxVTXm/lYKg7fq548HCdf1Kce9qKyYZNMGCgQ h9mel2J3Wa70TnWhCe8rYIzf7DpRVfzOrpSe/LD3mPKzdO6/OHwJBNRZUQHWkD1YW9Rq k4tInUKFp9uB6JhmYCilgFTnKo7FYOheR34BQJ99hEXdS5v99bRMylgo7TQ3IZfj2a2W zH++fP0ZnFCAcb2XxO/JZbopyDvwObBFtb+0KnjIuEB1fdePgwpre2nR8g1u0O1z2dAB AykghUSI8bnqCPJ4imLQSRcwpm5YdxVatkHSXttVijNvEP4ArvlxoPZ9fhFnXzrO5CV/ E7EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YsMFbH+R; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d32-20020a634f20000000b00373a611b00dsi11130681pgb.416.2022.02.28.23.38.39; Mon, 28 Feb 2022 23:38:54 -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=@intel.com header.s=Intel header.b=YsMFbH+R; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232126AbiCAGlc (ORCPT + 99 others); Tue, 1 Mar 2022 01:41:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiCAGlb (ORCPT ); Tue, 1 Mar 2022 01:41:31 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A710473BE for ; Mon, 28 Feb 2022 22:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646116851; x=1677652851; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=sTdaEj+CJ6VXmMzCvIX4ApOCddLE+v7WPcrPQ46FEzc=; b=YsMFbH+R8hAYno7+1UqXoH55rs+GrbRh8VvYxaAr/V3Ol6DmIBEj1UwO t5tICV3X4/7LS/+ug3kWmEVog4i+FAfRyMCc2AUhd8VXEuLN2z8TpHtMj 2H6CYf0V0TgBf9t5PQMF5NY2frMCBLNCzRn9P9xSOJMjDJm1zu7jJHFgE kkUXndWmNS9x4TDpMDY3eOY2kiwfNU2+U3gKozvTOB1W4by4B1B7EJD4H gGzEe/NpiELv3pX6cRHl4zWEKxzG9llz6CHoroD5sWhqCaL+P3qVYBo/T AlAomVp2qAixjhDcCsfpNh+8rb/iAr5q16xAecMHBWVqaJQdCuMebgtyX g==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="251902101" X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="251902101" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 22:40:51 -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-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 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