Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5049508imm; Tue, 21 Aug 2018 05:34:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzrXJJakSfz/p4oTY//ADwOUVdzY83PV/X/vyjjY6yAkn+e26/BE/K/vrlqV0WP8HaN2Nwb X-Received: by 2002:a17:902:27a8:: with SMTP id d37-v6mr50208324plb.290.1534854843552; Tue, 21 Aug 2018 05:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534854843; cv=none; d=google.com; s=arc-20160816; b=Er5sHBa6pg1HWnQwOafVJctcdKHQuGqv3X5FbeFPPmDgS7A7jq8khAw0Xr9hgXhNVu 0TWe+GKluSpj9OceTKUn7wylcMYCq0w4wqwsVxjQAHLU2WlnkOmRNLZmqUIl+8Uzr6Tr e3vb04giC6C0CWWQbVgT1fvCzybyOjco3/fl8xc3Vja2urAXfQ7FGySv0rmPmKX20gRw g/t1XomS1keTVk3/Z9ahZO3tCgUmBhQs60YIUk+ZE5U++tSGBGZPi/pgm61F9ERBEVnH WA/gZ4EVdoReHYEWxg2mWKfLSth4mOSTnx+lGBhR6obX6d55u5iV6rCDHHTW+qPEWYTM iE0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=RT1SNjDjJjENmAIpbmSZQgEfAJp/COrESxQvq7RVcWk=; b=iJdrx9DxXOQXgEm2PRi3eUXiy3GZmkZPlRwdCprz5O1dOmbTuoN+7Kv7/eNh8jZNWi tDtkYSo6Kqjx7+r2WbjzXa5i7vtRQJ8kWNVa8xuY43BAp9bnzwVeMTqKr1xEHMUowRrk IVElnjzEpa68y+FRVNrMqq2dObFSzlTnyvfO6295mHICHi2qVw8ewxqcuZ7gOQLVxcsW Ecrvb3f3jUD04Pac6n7SNa+98PbzYzQcqGicDRhoxLovOM4YAnosfqTIHn/q8yrClxX4 F1g33D5vkAtYFpfqLWxMGLOZcLdb5h6i2Hg+g0DQWM21eRs5hGWNYwXi7OiInoq+Fwz8 Q9fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bb7-v6si12431356plb.359.2018.08.21.05.33.47; Tue, 21 Aug 2018 05:34:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeHUPuY (ORCPT + 99 others); Tue, 21 Aug 2018 11:50:24 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40052 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbeHUPuX (ORCPT ); Tue, 21 Aug 2018 11:50:23 -0400 Received: by mail-wr1-f68.google.com with SMTP id n2-v6so5230064wrw.7 for ; Tue, 21 Aug 2018 05:30:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RT1SNjDjJjENmAIpbmSZQgEfAJp/COrESxQvq7RVcWk=; b=V+ld3rCTcqrcKP/68xcwJy7FTI+AGxvdoC8npqso8RMn10aBrKKmRT3BNOGfCYnjsl JHeV4ODS0TODVurV95MtPgPRg5x7AoA3ja/7s/Eee98PfrWhgzipoAaWfj+CmKviB+9a oXx4Cu5qcUuXRK7f7Gsepcer0lgMb9TaQv6VGT7Xa1vrdZrhzNap/yjOVo38ccCVMIbA dlWXaem4+bdn/1ee1s4Lsm9A0MLWnsqR3BkFuizAfMxREbq+S1TvgzP8S8SXhLh0C4no iogFuis9gH67/maubm0Yk4w/TEMsr1An3drWly9NdEbsD45qhzQlPmgVl7Lf3hb1jNuA fW1g== X-Gm-Message-State: AOUpUlFxU1OD/RTAJJ9QUMPmQuQHhMfBDYCLRteSAcUk4jflFkizgV00 O0Zo10NdQWK68Yq1R6Qy0Yb2vAoc X-Received: by 2002:adf:dd07:: with SMTP id a7-v6mr30730648wrm.2.1534854625400; Tue, 21 Aug 2018 05:30:25 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id w3-v6sm8270782wrn.16.2018.08.21.05.30.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 05:30:24 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 20FB41249C0; Tue, 21 Aug 2018 14:30:24 +0200 (CEST) Date: Tue, 21 Aug 2018 14:30:24 +0200 From: Oscar Salvador To: Michal Hocko Cc: Andrew Morton , tglx@linutronix.de, joe@perches.com, arnd@arndb.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador Subject: Re: [PATCH] mm: Fix comment for NODEMASK_ALLOC Message-ID: <20180821123024.GA9489@techadventures.net> References: <20180820085516.9687-1-osalvador@techadventures.net> <20180820142440.1f9ccbebefc5d617c881b41e@linux-foundation.org> <20180821121734.GA29735@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180821121734.GA29735@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 21, 2018 at 02:17:34PM +0200, Michal Hocko wrote: > We do have CONFIG_NODES_SHIFT=10 in our SLES kernels for quite some > time (around SLE11-SP3 AFAICS). > > Anyway, isn't NODES_ALLOC over engineered a bit? Does actually even do > larger than 1024 NUMA nodes? This would be 128B and from a quick glance > it seems that none of those functions are called in deep stacks. I > haven't gone through all of them but a patch which checks them all and > removes NODES_ALLOC would be quite nice IMHO. No, maximum we can get is 1024 NUMA nodes. I checked this when writing another patch [1], and since having gone through all archs Kconfigs, CONFIG_NODES_SHIFT=10 is the limit. NODEMASK_ALLOC gets only called from: - unregister_mem_sect_under_nodes() (not anymore after [1]) - __nr_hugepages_store_common (This does not seem to have a deep stack, we could use a normal nodemask_t) But is also used for NODEMASK_SCRATCH (mainly used for mempolicy): struct nodemask_scratch { nodemask_t mask1; nodemask_t mask2; }; that would make 256 bytes in case CONFIG_NODES_SHIFT=10. I am not familiar with mempolicy code, I am not sure if we can do without that and figure out another way to achieve the same. [1] https://patchwork.kernel.org/patch/10566673/#22179663 -- Oscar Salvador SUSE L3