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 E8DDAC6379F for ; Tue, 14 Feb 2023 13:39:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68CC56B0072; Tue, 14 Feb 2023 08:39:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 63C6F6B0073; Tue, 14 Feb 2023 08:39:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5038F6B0074; Tue, 14 Feb 2023 08:39:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 3E6296B0072 for ; Tue, 14 Feb 2023 08:39:04 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 131FB1C6658 for ; Tue, 14 Feb 2023 13:39:04 +0000 (UTC) X-FDA: 80466003408.26.13C6CA7 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf23.hostedemail.com (Postfix) with ESMTP id 9F577140023 for ; Tue, 14 Feb 2023 13:39:00 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=MFsQlHcS; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676381940; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fVkDxlzkjhPlGXV60nBdIuB31PjiXgHNSQsXA54F1NI=; b=oauVfehddURhqzlGxejLQRMVB1VR6QIYgQN+THCLQUYyLkYhQGcINEfzj3+imYtWZ2YAgn Q6y1Hqm32fzVOALjFRS0w9DLTPgSFCmkST22NIqVAPLseoC7mrNDayNuFm7BKEhSr1Ddu5 7NxNZTiDCrhzThYV7XXcPSMHn/vWN1A= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=MFsQlHcS; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676381940; a=rsa-sha256; cv=none; b=1qQxQ0MXaoVj9kPAXqFU4Cyc9fxrP8LWTLBtGLlwyO8hoyF8asb7HGgTuYRBU2q80ONZSs VTj3LVpsrVW68GjweRK37nAKTHx2NjCaCoM+1MHkWfO1XYyd2cXnylNJn+Hi/0sq09hflC B/AbHmnOjItGJyjX4ohOnqOFsPi2ZYM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 40C461FDCC; Tue, 14 Feb 2023 13:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1676381939; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fVkDxlzkjhPlGXV60nBdIuB31PjiXgHNSQsXA54F1NI=; b=MFsQlHcSHW5ymDxefdZXVg0eNsTKCNHecnlN8mVLZwXtJt/zzSJFIRoUCfuvqHR3d4NbV3 GkjPC+iWPVTWFJV7r6TmtfaaEA3VvBqAtNZoanOcYBX458i4zEEngB/R8dHcEeHLGob5EH DFPk2Xz/iSStQFb5R1nMAoB77QvQUS0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 02E11138E3; Tue, 14 Feb 2023 13:38:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1PpkO+SO62NXOwAAMHmgww (envelope-from ); Tue, 14 Feb 2023 13:38:44 +0000 Date: Tue, 14 Feb 2023 14:38:44 +0100 From: Michal Hocko To: David Hildenbrand Cc: Mike Rapoport , Qi Zheng , Qi Zheng , Vlastimil Babka , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Teng Hu , Matthew Wilcox , Mel Gorman , Oscar Salvador , Muchun Song Subject: Re: [PATCH] mm: page_alloc: don't allocate page from memoryless nodes Message-ID: References: <67240e55-af49-f20a-2b4b-b7d574cd910d@gmail.com> <22f0e262-982e-ea80-e52a-a3c924b31d58@redhat.com> <4386151c-0328-d207-9a71-933ef61817f9@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9F577140023 X-Stat-Signature: raotgjradeo9sdedsfb6iuretkqgug1w X-Rspam-User: X-HE-Tag: 1676381940-240484 X-HE-Meta: U2FsdGVkX1/q+3Cm84JnAPuDwgg3W1KyMzR4zhkfUH7L2QJuTMyf7fYmv3LGTz17NbNNg79F7N/BzkWupoyKBx8dP/ti8kcRqcfoTAHEiegotnt+gRrbH4iipCVnsA0tqD7xqWF/ULDIDlC3pY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9yg4uvF/Xbu2ZGHVnfHWX8N1Y+8e8eJK4Z76mrjGM 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 14-02-23 12:58:39, David Hildenbrand wrote: > On 14.02.23 12:48, David Hildenbrand wrote: > > On 14.02.23 12:44, Mike Rapoport wrote: > > > (added x86 folks) > > > > > > On Tue, Feb 14, 2023 at 12:29:42PM +0100, David Hildenbrand wrote: > > > > On 14.02.23 12:26, Qi Zheng wrote: > > > > > On 2023/2/14 19:22, David Hildenbrand wrote: > > > > > > > > > > > > TBH, this is the first time I hear of NODE_MIN_SIZE and it seems to be a > > > > > > pretty x86 specific thing. > > > > > > > > > > > > Are we sure we want to get NODE_MIN_SIZE involved? > > > > > > > > > > Maybe add an arch_xxx() to handle it? > > > > > > > > I still haven't figured out what we want to achieve with NODE_MIN_SIZE at > > > > all. It smells like an arch-specific hack looking at > > > > > > > > "Don't confuse VM with a node that doesn't have the minimum amount of > > > > memory" > > > > > > > > Why shouldn't mm-core deal with that? > > > > > > Well, a node with <4M RAM is not very useful and bears all the overhead of > > > an extra live node. > > > > And totally not with 4.1M, haha. > > > > I really like the "Might fix boot" in the commit description. > > > > > > > > But, hey, why won't we just drop that '< NODE_MIN_SIZE' and let people with > > > weird HW configurations just live with this? > > > > > > ;) > > > > Actually, remembering 09f49dca570a ("mm: handle uninitialized numa nodes > gracefully"), this might be the right thing to do. That commit assumes that > all offline nodes would get the pgdat allocated in free_area_init(). So that > we end up with an allocated pgdat for all possible nodes. The reasoning IIRC > was that we don't care about wasting memory in weird VM setups. Yes, that is the case indeed. I suspect the NODE_MIN_SIZE is a relict of the past when some PXM entries were incorrect or fishy. I would just drop the check and see whether something breaks. Or make those involved back then remember whether this is addressing something that is relevant these days. Even 5MB node makes (as the memmap is allocated for the whole memory section anyway and that is 128MB) a very little sense if you ask me. -- Michal Hocko SUSE Labs