Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1351048ybv; Thu, 13 Feb 2020 21:32:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw8Iua8Hmk1oKgBbLiHAPwc5y+KA/ARcEt4oMPv3Bci+YAn1PmNyZWdOJu6BTzI8Q2V1TsJ X-Received: by 2002:a9d:7d93:: with SMTP id j19mr975340otn.102.1581658373933; Thu, 13 Feb 2020 21:32:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581658373; cv=none; d=google.com; s=arc-20160816; b=s51kyIdGPkzTSLHLuq2txWtwVlilOfEALD5WI9JAf4mkY3T0wper3k1zVvVTWZrX5+ ZIoZphb/bhptHb9WiPGh2e1Hzc1vUegNZ7bd9f+uXKfGBIJsMxcljny7A7c72JnRGsIQ jFDmVffUTMpPeQrHQbg//UB1c83GT+XaL5pVTShTlm4MGKX0VsixuBolvuWN157bDdnR Oy/XJJxx7UnDuuKnMNGTqERx0I07owaruZMHs6OFo7ln03HVxi+Y8pItqipaytmVUZw5 iAV3fRyZYEcO7Hm/u3Zto0vugWL1jojFZGbSGZLGKZ1AopkaJ8oEqbQT6/ngb5PMMg4D F8aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tpfz/1bkZwel7V9jOU6slwem/9d6WNgS04/ERfoI1pY=; b=YIAuMEKnYQQOIpCn0XW18h4V/NLfIxdUlP7cQzbz6cj6XuK5CG8N2i8djAf1/jDWDu ib10lPbx9In1IdrJ2dRtClbs/eezTGAhX+Bt7sBkITm5AymPNtCWQmvQjXUqn37l6mUE Y/83eXMa/AyHFnlyVWe1P/3ljRh90/qZzr+o+6yXCiGyJKDgN9G2jpkGYt1TnUU9LeZL Be2hML2CBvlQYpHechK0rwlqGtgHe2+CKxnHRllttzEy5tDIOC4jcz6/N4zQHLGO2alJ DSqRAtxht2n4HzeM1jKLKi5yDlQvDRw888NiKSvNA3qNka0jt2LWzZLiOVlwQQ7Ik1Ov sTkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WTL36L26; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si2374911otc.130.2020.02.13.21.32.40; Thu, 13 Feb 2020 21:32:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WTL36L26; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbgBNFcK (ORCPT + 99 others); Fri, 14 Feb 2020 00:32:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:49986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbgBNFcJ (ORCPT ); Fri, 14 Feb 2020 00:32:09 -0500 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B902222C2; Fri, 14 Feb 2020 05:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581658329; bh=0XCC6PWPF29FcnHFcnUyn1Gnz3NxA69HtzrTAmk3D+s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WTL36L26p8iakIvjdn7YExA/A2xLToewosQxcZjWjc8+304bSzejHJFrprHkHuTp7 +YANGa1YqM1s14vDlE30Q/WcFCVG3YUaXF461bmDM4rZaSbN3+ZFkcvMpDEumrLcVH jsfY/yokVh7NpjBSj2VtuQzaZLy9UGpInS61G3xo= Date: Thu, 13 Feb 2020 21:32:07 -0800 From: Andrew Morton To: Wei Yang Cc: David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmscan.c: only adjust related kswapd cpu affinity when online cpu Message-Id: <20200213213207.34b2aa0e0c2c92a09b700e96@linux-foundation.org> In-Reply-To: <20200128003942.GC20624@richard> References: <20200126132052.11921-1-richardw.yang@linux.intel.com> <20200128003942.GC20624@richard> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Jan 2020 08:39:42 +0800 Wei Yang wrote: > >Is there ever a situation where the cpu to be onlined would have appeared > >in the cpumask of another node and so a different kswapd's cpumask would > >now include an off-node cpu? > > No, I don't think so. > > Per my understanding, kswapd_cpu_online() will be invoked when a cpu is > onlined. And the particular cpu belongs to a particular numa node. So it is > not necessary to iterate on every nodes. > > And current code use cpumask_and_any() to do the check. If my understanding is > correct, the check would return true if this node has any online cpu. This is > likely to be true. > > This is why I want to make the logic clear. Please resend with a changelog which explains the above?