Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1651013yba; Tue, 2 Apr 2019 13:03:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx/n+0uo39T2SL9Nbkh+t9Hd3OWcR0IKnflXFgO0fj2I/c1NFO91GvOvwEgWXGDDVTsLl3 X-Received: by 2002:a63:6941:: with SMTP id e62mr8557362pgc.99.1554235384110; Tue, 02 Apr 2019 13:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554235384; cv=none; d=google.com; s=arc-20160816; b=Af4OOFo2/z9C40Y/r6P3qwbwAz51O0E25aEiF5On6h4mrL2qVVqRvBEAAn7P8Dzmvh iWUMCZWnxru6vaByocdWg2SMbFf6MVEt55kzfZzCvnm32ATJpcxhtEYi+heLgoWUNRKG PWQW/THHl4S68Mw4Ef4zuv0SGPxH0jHrsSW4gdposVFC6zegwLOhWffhkwd8nY8N42cD 6kmD/+mLql/P42dAjYBQsfCzr5iEHHLk8ps8dOkQ96IZOYfTxmp1oueJRYv4e6Q+jQZ3 2gbFzhqA/tfVwtdCCkt+ZRSMPW3gy1uQcHg6pNHmDM/Jgk2z5tuv8TEtAEEPWv1eSo+C an6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=D51T58mIQA7PGpMmrkD5jv4bew+qqilD3LL2ilwXehI=; b=qU8+lx/Er06OpHStoPs/9m9Hef3HB25n1oTktHpNY4NZx0A33JOJ3PqI9mcE5M9lgu Y8zQ5rqpcn1Ii1zMQq/hEY2gTqHnKAurSxbhF6sUs9xG+A6xNT/kHE6FmmjkU0uVenzm F14EePsZqvirqjE9k6SxJnbazAZSKXWlTK0VfawgzZ1P0f2opdv1kz4qEFS5GUtbfBre SV40vMSAZjUSsnJwZOjGrhSFu8fg7pycdOMNRytAjqArm0sLegjJHoNtTSCl11SbDMPa vroEBdmPQGbjl0/p2UAF5b/I4AqxECN1Oe6wSdnffv1EkttJygy3evXLAbnt7+2xd75e NJnw== 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 k186si8833055pgd.206.2019.04.02.13.02.47; Tue, 02 Apr 2019 13:03:04 -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 S1726116AbfDBUB5 (ORCPT + 99 others); Tue, 2 Apr 2019 16:01:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43206 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbfDBUB4 (ORCPT ); Tue, 2 Apr 2019 16:01:56 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DC995EA8; Tue, 2 Apr 2019 20:01:55 +0000 (UTC) Date: Tue, 2 Apr 2019 13:01:53 -0700 From: Andrew Morton To: Oscar Salvador Cc: mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/hugetlb: Get rid of NODEMASK_ALLOC Message-Id: <20190402130153.338e59c6cfda1ed3ec882517@linux-foundation.org> In-Reply-To: <20190402133415.21983-1-osalvador@suse.de> References: <20190402133415.21983-1-osalvador@suse.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Apr 2019 15:34:15 +0200 Oscar Salvador wrote: > NODEMASK_ALLOC is used to allocate a nodemask bitmap, ant it does it by > first determining whether it should be allocated in the stack or dinamically > depending on NODES_SHIFT. > Right now, it goes the dynamic path whenever the nodemask_t is above 32 > bytes. > > Although we could bump it to a reasonable value, the largest a nodemask_t > can get is 128 bytes, so since __nr_hugepages_store_common is called from > a rather shore stack we can just get rid of the NODEMASK_ALLOC call here. > > This reduces some code churn and complexity. It took a bit of sleuthing to figure out that this patch applies to Mike's "hugetlbfs: fix potential over/underflow setting node specific nr_hugepages". Should they be folded together? I'm thinking not. (Also, should "hugetlbfs: fix potential over/underflow setting node specific nr_hugepages" have been -stableified? I also think not, but I bet it happens anyway).