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 649A2C61DA4 for ; Tue, 14 Feb 2023 11:58:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 963886B0073; Tue, 14 Feb 2023 06:58:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9132D6B0074; Tue, 14 Feb 2023 06:58:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 801B26B0075; Tue, 14 Feb 2023 06:58:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 71D616B0073 for ; Tue, 14 Feb 2023 06:58:53 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0415040F77 for ; Tue, 14 Feb 2023 11:58:52 +0000 (UTC) X-FDA: 80465750946.21.B723AC0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf25.hostedemail.com (Postfix) with ESMTP id C6CE5A001C for ; Tue, 14 Feb 2023 11:58:50 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SwaIoNq+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf25.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676375930; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xCI275q7Re7p2r++uBopIlhImbMsa+Jw/kg9hJ/qKDs=; b=0LnwmqzAOeD2diCYIDBVALFdevKCrWjZpWhceLzXbtxKAGoJ/vKZQWaEtCesXyuBGnVBBy Yc93J7hT5jJugIvZhHRlWqIVmy7RZvcftnsrm5tcjkq5Y72DUMkmd1p+ReffAmBsadqexR nT/aKchWQM0SyOAaiVLcxk7+Uma26oY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SwaIoNq+; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf25.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676375930; a=rsa-sha256; cv=none; b=4rVWWBCiBMeeEo3flVlINV+INjWAd8YpVEGovp/OjnRNlRCsP31vk1DV5s3RAik72Tjpdv 27jdMlbRvQMOQ84KAMS/Na9gRYN2V9LJuLFNQc06+PhqXPmcrNFXxHOfRcb3mxZ688d4pN HIHOyrSyQ6AKJY4xyidfWawg4OJrojQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676375924; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xCI275q7Re7p2r++uBopIlhImbMsa+Jw/kg9hJ/qKDs=; b=SwaIoNq+QmEFKONUpv4asAzwS0s1msdY2Eua2cgBjVW/ifzLzm+N8fdRm4/CFdEdqmRehl Cfp+r0O/TVWkq5MwU7ZU5+lk0uclwv+GrTj3fMpCPYx9DU6/m0XNEJo8u7XTUOHIWdKPHb SMXJunjbP6dsLfXtmDfJOaAKgib9hdk= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-633-8-Mf_nIMMBypnhT7ZTAfvg-1; Tue, 14 Feb 2023 06:58:44 -0500 X-MC-Unique: 8-Mf_nIMMBypnhT7ZTAfvg-1 Received: by mail-wm1-f72.google.com with SMTP id l21-20020a05600c4f1500b003e00be23a70so10838366wmq.2 for ; Tue, 14 Feb 2023 03:58:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xCI275q7Re7p2r++uBopIlhImbMsa+Jw/kg9hJ/qKDs=; b=uO2j5oNpbtVXGTCw+sZaqWlV21f+WOnuE+0nx+5P4kr0bwpkxZZIdnf8sNzV8shVLA PLITFDvt6+oSrtURy7sViGzpnYDvVpZ9vN8WJetMif5MmPnk5c+Wr5rzHR97WN2dWF1t 6XncYQGmBkNfJcpgYlxXRAJfVmIsa6VjEFqUH+KKGfLct9a7wUbEOjCHDLuHnm7MnkMu G66peme8jkPQAD4pSNTPXRcQOZpwJ/eghPwLTyIqu8iFFjIaiiEVG9cNIqJuXjc29VZZ +oqSCpikrjY0FPOHx5bLs6uAOz6GxoBahaRQCY1xziBMDpLREuZmGS8uku27HJ/ZoQYx sSBQ== X-Gm-Message-State: AO0yUKXcnXBTpDv5x+cKT7m41AyMGd4D9ZhlqYIdXrPsVSghPdPcAjDb 5hAmq9wqVDoVlyKQmbWWzKAZGelGEBVTiKv/huKXdhWsK4PpuyBNBYuelnlaGqUUNMC3ZV3kqND haG8Q39TMBgs= X-Received: by 2002:a05:600c:35c8:b0:3e0:fad:5fa8 with SMTP id r8-20020a05600c35c800b003e00fad5fa8mr1803233wmq.33.1676375921559; Tue, 14 Feb 2023 03:58:41 -0800 (PST) X-Google-Smtp-Source: AK7set990JaS7uUFyKyTp55fSOofXVeZ1Srq5o+Oy+DgP2IHN1qweCfpWOLxsipUpS8mFC9XLhFCRQ== X-Received: by 2002:a05:600c:35c8:b0:3e0:fad:5fa8 with SMTP id r8-20020a05600c35c800b003e00fad5fa8mr1803225wmq.33.1676375921326; Tue, 14 Feb 2023 03:58:41 -0800 (PST) Received: from [192.168.3.108] (p5b0c60e7.dip0.t-ipconnect.de. [91.12.96.231]) by smtp.gmail.com with ESMTPSA id p5-20020a1c5445000000b003dc492e4430sm16735098wmi.28.2023.02.14.03.58.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Feb 2023 03:58:40 -0800 (PST) Message-ID: Date: Tue, 14 Feb 2023 12:58:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] mm: page_alloc: don't allocate page from memoryless nodes From: David Hildenbrand To: Mike Rapoport Cc: 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 , Michal Hocko References: <20230212110305.93670-1-zhengqi.arch@bytedance.com> <2484666e-e78e-549d-e075-b2c39d460d71@suse.cz> <85af4ada-96c8-1f99-90fa-9b6d63d0016e@bytedance.com> <67240e55-af49-f20a-2b4b-b7d574cd910d@gmail.com> <22f0e262-982e-ea80-e52a-a3c924b31d58@redhat.com> <4386151c-0328-d207-9a71-933ef61817f9@redhat.com> Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C6CE5A001C X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: uk4oe37pd1x5oqa4gwi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jGn0cN3FU3tdYw5GiKGCWCFCrezxjTX9/HHPJVVRaSG9yRcn/Ne3gNYh5ZVfDflJfzvDHI2fHv4yoyjYa/0BEh3OSIqF7/1XHGS+JRgkUPwHShuNmr+bMzXFnXw0Et4fhnDc3W3/XXUw1idjW6e03gM0AIQ49PWF13ohJuFbBRriG5/g7/95QAOtgP6lVJRb+dSfEAcZYA62ZWH8UFO4a5WZzZhoIItXFWf6kzgNTteQhPBkoxCn2mjgxzqVexE55BWZMSNNqhpqDtf/9LLY5u4MHxSufU5CUVGfMzSg5sSOBeQdCvCISybtneygvy0r54K/ST2Hnh4dK/acDbm5PoA9AGYEGwPZtWhSWl8vPIZPJpPQ2KRaQ9V404EZoqw0jQ1MsvT+YdwJPqxqc7tr9k0TUvJZsV0s4ic8drqhOVGPFbGtIvDB/zQOH6W9PimJTG1pymiFMi20DFStE6LkmDAy/C0vPiYiAUK+ImSGKdbUaD 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 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. CCing Michal. -- Thanks, David / dhildenb