Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13672700pxu; Mon, 4 Jan 2021 00:52:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyX3Q2KCKznEGXoaYZbuSNdESBmSYAkNU+8RWEAtTGKLQwGq928g+er+TQemihuF1v+wkr6 X-Received: by 2002:a17:906:8255:: with SMTP id f21mr64856655ejx.265.1609750326762; Mon, 04 Jan 2021 00:52:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609750326; cv=none; d=google.com; s=arc-20160816; b=wctIPuj7Z/VwqC6tq1p964GqbqRo7pUu8tcyTizyDkhCIdMDF3RTAThGVUO/Td1Fom Lsa3ww3kVXxEzBBp3QIkvtA7m6B9CVxSUVKkVeDbYo2Ejo8qe4qs2ElcPSsstLcJLxJr iG7LLNrT/rE3iXJZ2Hz0HtMG2jhVGZOIhOi7PDRAmaxeYnxZsRWGYgouMmusLyey5735 KJagqy7HOqOxMT7GBD4NoHXXb62qkftL81Z3DHZRgBNFS6eYZHPLo1y83DsfeeRtWWFJ pVQ7JvLCGZlFZfFnwSeP7IWu51V0/9JaMnaZ5m05Z2POA6cDaCkS2Rui5Tfh3g5dQLeT oiFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lqG4UmkZPkzR4Zi5SXqaX9O4JmxRq0adZPH7D9loI+Y=; b=S5Mpu4ZTPp1lTpDm/nb0ZOqoRM7Zw3yUxgGzMoE2/G46rXjrdncDuooi8pG2YjseY3 eE7Iz9/8z2bOVuW89GkIIUrwXmi0voZMCADDwLX4kMAlqt7oYnZILrfAlohQCrQ5y1pj kdUNi2vcCBXbhezMOvnLUIgUh5zO4Ogc65woJC8NiB1p11MH6CUUI6eDGsgi4u7VdRkF u984bWKZXc+tZX0OjboTd+o7sGqZctGRsA6ZvJtM9BINzTfAkFxWYUKnSrKCuHyunQgZ soFuCGMIQ/rAnHBvn9+ZobDjU03AcpZtdaKqbm15D8QEWt4woYJ1wvOgoCe1ZeIaQ0sY pSzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Fl8muME5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r22si29103153eji.295.2021.01.04.00.51.43; Mon, 04 Jan 2021 00:52:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Fl8muME5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbhADIs1 (ORCPT + 99 others); Mon, 4 Jan 2021 03:48:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:48386 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbhADIs0 (ORCPT ); Mon, 4 Jan 2021 03:48:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1609750060; 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=lqG4UmkZPkzR4Zi5SXqaX9O4JmxRq0adZPH7D9loI+Y=; b=Fl8muME5yB3vL19zQ0uF80xGhufGuQs0GG9x52XThP/w+In1WyVlOJzi2DYH4SXQbHSDrN gOtPAQmKSICkk7DK2rotycPHYpr0p5QYVwIvwLAwH7ard5gD2Qla8MiaEkj9HYlsRS2Rx+ EYzPVl9h83dFnWHYsDYPA1QxUszb920= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 64AF3ACBA; Mon, 4 Jan 2021 08:47:40 +0000 (UTC) Date: Mon, 4 Jan 2021 09:47:39 +0100 From: Michal Hocko To: Muchun Song Cc: Matthew Wilcox , Hui Su , Andrew Morton , linux-mm@kvack.org, linux-kernel Subject: Re: [PATCH] mm/page_alloc: remove the static for local variable node_order Message-ID: <20210104084739.GB13207@dhcp22.suse.cz> References: <20201230114014.GA1934427@ubuntu-A520I-AC> <20201230124233.GE28221@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 30-12-20 21:41:30, Muchun Song wrote: > On Wed, Dec 30, 2020 at 8:45 PM Matthew Wilcox wrote: > > > > On Wed, Dec 30, 2020 at 07:40:14PM +0800, Hui Su wrote: > > > local variable node_order do not need the static here. > > > > It bloody well does. It can be up to 2^10 entries on x86 (and larger > > on others) That's 4kB which you've now moved onto the stack. > > This is not the first time I have seen similar changes. So what > do you think about adding a comment here to avoid another one > do this in the feature? Well, this is not an unusual technieque to reduce the stack space. I am not really sure we really need to put an explicit comment about that. I would appreciate much more if patch submitters took an extra step when creating seemingly trivial patches and either consult the history of the respective code or look for a similar pattern elsewhere before sending them. I do agree with Willy that mm code is usually not a great place to search for trivial patches. First of all most people tend to be pretty busy with other reviewes and the code has grown rather delicate and tricky so each review is non trivial. -- Michal Hocko SUSE Labs