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 1B32FC433EF for ; Fri, 14 Jan 2022 00:24:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9F766B0072; Thu, 13 Jan 2022 19:24:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A4E9B6B0073; Thu, 13 Jan 2022 19:24:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F0AE6B0074; Thu, 13 Jan 2022 19:24:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 823FF6B0072 for ; Thu, 13 Jan 2022 19:24:18 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 49C6D82E34A0 for ; Fri, 14 Jan 2022 00:24:18 +0000 (UTC) X-FDA: 79026995796.31.C6488AD Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by imf18.hostedemail.com (Postfix) with ESMTP id DE67D1C0006 for ; Fri, 14 Jan 2022 00:24:17 +0000 (UTC) Received: by mail-ed1-f42.google.com with SMTP id t24so29119428edi.8 for ; Thu, 13 Jan 2022 16:24:17 -0800 (PST) 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=5zmKEUhzCkz1KenuWvpv6GMsWqgprMiy2UAeYsWU8Uk=; b=MKzgQXYEkBn98my1ggUaKQwtoDdc4Ha/0Tq8y1bN4ZQIBw6oao22XYluV9S5S76pMc HJ92bALDv5rhgmiTUoBcPpzKDMzK4pNhh+mtmHb1whz1YYXDFNVauRKrsIb8FvY5cK7x QphfaDxgxqiOouz//N08ARxZlgMpVRnYx1aeOSWuVfXPPGsFuEpPe0I0hleORRgCUP/S YAx38PLvGbDE1WQdBH6ZCve53LJudxfuyBMxlXGhntfzSQ76OfhzT3y1Sr9TN4p6xW2/ P9mugddRxwhrBZFOLbL3RkS6Lf3PeR4PNyfjopp1ow8x+5DhD58jTxmjjscUNRxm7gnp ubmQ== 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=5zmKEUhzCkz1KenuWvpv6GMsWqgprMiy2UAeYsWU8Uk=; b=IZcSJn4FDYcBPDwtF9bH4sXsszVNphNy+/eslgMkMUGtUZbwz/LBIDdOE9xSJbpdq3 uEPovxO/LWwcLubbd56Eav9SP1/Bk+RELRFY4Gd1P706C2rpCoDkHH6O7yEMzZAPB3tw mcDfe/7zcrc9VQxdFYlPAw3rWs5UHIoCTBi8g3iSdNIArAQDV9GrpT+2HyeEvubMrube L27JL4EKUfa4thvHBLC60DtSbxFt83X7oaFfuaWUlRBjhR5OrdgLv/5oXWEm6zZ4Wl7r WrK3gQZ3LxgEzNO/usnoifjd5aikxz74XnYQLmt511h5rggRGgmwYPF1px1914WBttZJ utrg== X-Gm-Message-State: AOAM532CKdNhuTUAzJNHrSr7IWO+SIVXjy8/UF+MMany/AIgXtpKpe+4 N9xfQ2OLB5oFaCGxSmctfv0= X-Google-Smtp-Source: ABdhPJxIWybHBJq7aJWGhltINrr/sOpNB2KjcfizkU+b7EKNWsouDxXXi9ITIf2kQmcEnv74K+TfRA== X-Received: by 2002:a17:906:794c:: with SMTP id l12mr5291248ejo.474.1642119856519; Thu, 13 Jan 2022 16:24:16 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id h13sm1686173edt.61.2022.01.13.16.24.15 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jan 2022 16:24:16 -0800 (PST) Date: Fri, 14 Jan 2022 00:24:15 +0000 From: Wei Yang To: Michal Hocko Cc: Christoph Lameter , Andrew Morton , David Hildenbrand , Alexey Makhalov , LKML , linux-mm@kvack.org, Dennis Zhou , Eric Dumazet , Oscar Salvador , Tejun Heo , Nico Pache Subject: Re: [PATCH v2 2/4] mm: handle uninitialized numa nodes gracefully Message-ID: <20220114002415.wfhhdp7ixn7kztqk@master> Reply-To: Wei Yang References: <20211214100732.26335-1-mhocko@kernel.org> <20211214100732.26335-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DE67D1C0006 X-Stat-Signature: iepakxmc544segtrnfd3gtm3mpo6dcqi Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MKzgQXYE; spf=pass (imf18.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1642119857-569150 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, Dec 14, 2021 at 11:38:47AM +0100, Michal Hocko wrote: >On Tue 14-12-21 11:33:41, Christoph Lameter wrote: >> On Tue, 14 Dec 2021, Michal Hocko wrote: >> >> > This patch takes a different approach (following a lead of [3]) and it >> > pre allocates pgdat for all possible nodes in an arch indipendent code >> > - free_area_init. All uninitialized nodes are treated as memoryless >> > nodes. node_state of the node is not changed because that would lead to >> > other side effects - e.g. sysfs representation of such a node and from >> > past discussions [4] it is known that some tools might have problems >> > digesting that. >> >> Would it be possible to define a pgdat statically and place it in read >> only memory? Populate with values that ensure that the page allocator >> does not blow up but does a defined fallback. >> >> Point the pgdat for all nodes not online to that readonly pgdat? >> >> Maybe that would save some memory. When the node comes online then a real >> pgdat could be allocated. > >This is certainly possible but also it is more complex. I aim for as >simple as possible at this stage. The reason I am not concerned about >memory overhead so much (even though the pgdat is a large data >structure) is that these unpopulated nodes are rather rare. We might see >more of them in the future but we are not quite there yet so I do not >think this is a major obstacle for now. Another thing is we still have a chance to get NULL NODE_DATA if we failed to allocate it. And this is the problem we want to address here. This is not urgent, while we may need to address this later. > >-- >Michal Hocko >SUSE Labs -- Wei Yang Help you, Help me