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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6226C3B194 for ; Fri, 14 Feb 2020 05:32:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6D031217F4 for ; Fri, 14 Feb 2020 05:32:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="WTL36L26" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D031217F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 05A876B05F4; Fri, 14 Feb 2020 00:32:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 00AEB6B05F5; Fri, 14 Feb 2020 00:32:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E62B36B05F6; Fri, 14 Feb 2020 00:32:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id CB5F96B05F4 for ; Fri, 14 Feb 2020 00:32:10 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4E386181AEF00 for ; Fri, 14 Feb 2020 05:32:10 +0000 (UTC) X-FDA: 76487611620.06.queen15_3006e99887919 X-HE-Tag: queen15_3006e99887919 X-Filterd-Recvd-Size: 2449 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Feb 2020 05:32:09 +0000 (UTC) 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 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: 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?