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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB903C433EF for ; Tue, 19 Apr 2022 04:04:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347342AbiDSEGj (ORCPT ); Tue, 19 Apr 2022 00:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347285AbiDSEGg (ORCPT ); Tue, 19 Apr 2022 00:06:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17BB9240A1 for ; Mon, 18 Apr 2022 21:03:55 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 16F2461158 for ; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?