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 31FC4C433EF for ; Tue, 19 Apr 2022 04:03:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67DDC6B00AB; Tue, 19 Apr 2022 00:03:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 637E26B00AD; Tue, 19 Apr 2022 00:03:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51B876B00B5; Tue, 19 Apr 2022 00:03:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 400EB6B00AB for ; Tue, 19 Apr 2022 00:03:57 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 079F41C35 for ; Tue, 19 Apr 2022 04:03:57 +0000 (UTC) X-FDA: 79372285314.24.98A1869 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf02.hostedemail.com (Postfix) with ESMTP id 047E680004 for ; Tue, 19 Apr 2022 04:03:55 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4C25B81106; Tue, 19 Apr 2022 04:03:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 113E7C385A5; Tue, 19 Apr 2022 04:03:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1650341033; bh=xhfzTucOQ3hmK/38S4jkVF5T/mzWkY07l0x1ixVkzkw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=q4zP8XmxFdYO3yLCJQQsSZi3Zf/IHCjWAXeIp9NXHWuv1SXDmPT6fq2jVqZjk3evs W9CwuS+lF9clvgwAjxRW2WSifAjpGEG2xpfJfIvggL1tExpVtnSQgbKQSobBih/J+C 8F79ECi2KOMr903EkBeUyIhSWJlUl1/nqqkCnFuI= Date: Mon, 18 Apr 2022 21:03:52 -0700 From: Andrew Morton To: Peng Liu Cc: , , , , , , , , , Subject: Re: [PATCH v4] hugetlb: Fix wrong use of nr_online_nodes Message-Id: <20220418210352.1d1d90aeba477d598bd6f0be@linux-foundation.org> In-Reply-To: <20220416103526.3287348-1-liupeng256@huawei.com> References: <20220413032915.251254-2-liupeng256@huawei.com> <20220416103526.3287348-1-liupeng256@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 047E680004 X-Stat-Signature: z8n4enrz3c5u8qur7wmgjyhtnrfpjrjw Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=q4zP8Xmx; spf=pass (imf02.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1650341035-133379 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 Sat, 16 Apr 2022 10:35:26 +0000 Peng Liu wrote: > Certain systems are designed to have sparse/discontiguous nodes. In > this case, nr_online_nodes can not be used to walk through numa node. > Also, a valid node may be greater than nr_online_nodes. > > However, in hugetlb, it is assumed that nodes are contiguous. Recheck > all the places that use nr_online_nodes, and repair them one by one. oops. What are the user-visible runtime effects of this flaw?