Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5791519pxb; Mon, 28 Mar 2022 17:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzima3biMrX4EcauzuTwIiLXrLCBra9/r2BY9B9wlPDXpCNIXQxpFnm3f1JdA7DnG87COXv X-Received: by 2002:a05:6808:14d5:b0:2da:455b:1917 with SMTP id f21-20020a05680814d500b002da455b1917mr66273oiw.81.1648515183266; Mon, 28 Mar 2022 17:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648515183; cv=none; d=google.com; s=arc-20160816; b=VwIdhC4lvJcVTgFJ4Fo4edgY4wgon67KKXkYobq8IzIL1Br/uuCAdfsAiEawJtiLwy yl0pVzeGD4fhoiTTPkI1Hm5A0MaH/KVRqsT830dSs1gdqLmZzatr0pcBzMPiN2dpDMnP qgVHy4sbtoPlk9EGh1dBRySHBUqK0QEbrDLFIXMKZkBs8BOz/a7LEdxRm6h1UIhnJ2iN 8/ALNfoJ7pWBHuqyRn6ezMukyQINTImcUdvtKD79WXT02uUdYUaW8CqVV9AvEA04AI2R lym4dPBnqgYkkk6hrQfrBQ+Ebgg/eQF/0a6k60ni0/fmFg0sJziTntjkFn7ZCSIrZPHF JdUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0b52Q/UfwrxflFU9LmcGLJ4e39trW7MxqP3FSaolBUg=; b=JPz9ptK6ArTSfkGo6gXQvq+KO/Pfxb18U8+Eq2QFHPRseDEV+4SnE0qCAp2U8yr1Ni kRoxsA7i5mvufUic6nu2tC3a0IdD2lCo73rw8qjUOIVaAV/sr479O9jCyc7WksXPQ+Zh ULx0djS2VN0iUxhMmDkBMvEi+MYwGl6QVDSTkQbd0BjN0Tc/l7BicPLr+bS4LJAeqB02 VuaQrRLoTjGQ0ynkbEMgrWzru/+aiaC2DNd9eLRbdYGQTGyUYSU+Q1Q/4A1PLMesnAWQ i/9TFudQcQe9pDrevkKPkgSJk8UaJ6zCXpeJ8v0qIh49dyFIDPjLYKBM5JpG1QIBeK4z s9Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Tpg/+5Vb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j9-20020a9d7389000000b005cb2fc1385fsi12001993otk.219.2022.03.28.17.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 17:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Tpg/+5Vb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 524A9221BB5; Mon, 28 Mar 2022 17:41:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbiC2And (ORCPT + 99 others); Mon, 28 Mar 2022 20:43:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbiC2Anb (ORCPT ); Mon, 28 Mar 2022 20:43:31 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6211722030B for ; Mon, 28 Mar 2022 17:41:49 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id pv16so32012203ejb.0 for ; Mon, 28 Mar 2022 17:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0b52Q/UfwrxflFU9LmcGLJ4e39trW7MxqP3FSaolBUg=; b=Tpg/+5VbOWVkwV19w/jrJOoTY65GPvHxwUlxOD6jI+i+KG/1Hxf0Br1p09PoWg/LI1 2XcB7Bb2dgSuJeEvypwrTy5k7SArTutGzL5c5J+kS3nnZOlAwZgYJVV2PObN027BL9H+ NCJ3qc6maTMo9f9FBf2KiYSYB6qI/tVS4L7zcIb6aK9gZmb6ichssxz6zOeXN5CdirEP GciT9gyOQOlnzD8ygNbzOkxSsHSRkwnfyqWg6Wu39jD0dGvY+ckFhc56Fo/dYuW5GN1P AM0tv/kfOb2duaeB1GzOkyKZ5i77NtjwWxwdmEq0rB1l4C31lwcIo1VVofFLSEzxCaw8 +G+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=0b52Q/UfwrxflFU9LmcGLJ4e39trW7MxqP3FSaolBUg=; b=nw9rSqHMngmDo+xmOgAXzZzDfaQrKUjmbLAFXAztLmX2H0Thq6+Ps9wEv1jVygA+co dxNK/GwiEN7QNQVm+2vgzALGfbysOjp5OtSgg7wfbu/niq9H7MPPatyO9BWNHC9sNIp7 hosHujkCYi59A9wqT6aizM7O0iQkOOxb90O/vqR0iUKvXHIcE07tkjNz4SvAgGHKOKb1 m+jNd30NO1wmJZO62jFF4kw5wHTlLrecO4fXymkCcbO/ki1dQtoYj2VIFN6loAQwkkZw U+H+ZTwdXQH8fOdfLGG4Uxt+/MNQigtpYj5EuHeA1yUODySGlTf4w2FE2FoNk9N7tFJ7 yvbg== X-Gm-Message-State: AOAM530wVGJQRMMIk6kXGE+GlsDeDVo8Pojj4UeLkdDsa2E9Scpdq0y7 resCZJnrywyM8ucLZlNEppA= X-Received: by 2002:a17:907:7214:b0:6dd:e8fe:3e9 with SMTP id dr20-20020a170907721400b006dde8fe03e9mr31480515ejc.51.1648514507859; Mon, 28 Mar 2022 17:41:47 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id ky5-20020a170907778500b006d1b2dd8d4csm6513592ejc.99.2022.03.28.17.41.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Mar 2022 17:41:47 -0700 (PDT) Date: Tue, 29 Mar 2022 00:41:46 +0000 From: Wei Yang To: "Huang, Ying" Cc: Wei Yang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mgorman@techsingularity.net Subject: Re: [PATCH 2/2] mm/vmscan: make sure wakeup_kswapd with managed zone Message-ID: <20220329004146.2xdswvrm2qu7f47x@master> Reply-To: Wei Yang References: <20220327024101.10378-1-richard.weiyang@gmail.com> <20220327024101.10378-2-richard.weiyang@gmail.com> <8735j2opd9.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8735j2opd9.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Mar 28, 2022 at 09:08:34AM +0800, Huang, Ying wrote: >Hi, Wei, > >Wei Yang writes: > >> wakeup_kswapd() only wake up kswapd when the zone is managed. >> >> For two callers of wakeup_kswapd(), they are node perspective. >> >> * wake_all_kswapds >> * numamigrate_isolate_page >> >> If we picked up a !managed zone, this is not we expected. >> >> This patch makes sure we pick up a managed zone for wakeup_kswapd(). >> >> Signed-off-by: Wei Yang >> --- >> mm/migrate.c | 2 +- >> mm/page_alloc.c | 2 ++ >> 2 files changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/mm/migrate.c b/mm/migrate.c >> index 3d60823afd2d..c4b654c0bdf0 100644 >> --- a/mm/migrate.c >> +++ b/mm/migrate.c >> @@ -2046,7 +2046,7 @@ static int numamigrate_isolate_page(pg_data_t *pgdat, struct page *page) >> if (!(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING)) >> return 0; >> for (z = pgdat->nr_zones - 1; z >= 0; z--) { >> - if (populated_zone(pgdat->node_zones + z)) >> + if (managed_zone(pgdat->node_zones + z)) > >This looks good to me! Thanks! It seems that we can replace >populated_zone() in migrate_balanced_pgdat() too. Right? > Yes, you are right. I didn't spot this. While this patch comes from the clue of wakeup_kswapd(), I am not sure it is nice to put it in this patch together. Which way you prefer to include this: merge the change into this one, or a separate one? -- Wei Yang Help you, Help me