From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933019AbcHIXZK (ORCPT ); Tue, 9 Aug 2016 19:25:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41562 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932990AbcHIXZG (ORCPT ); Tue, 9 Aug 2016 19:25:06 -0400 Date: Tue, 9 Aug 2016 16:25:04 -0700 From: Andrew Morton To: Joe Perches Cc: Andi Kleen , Alexey Dobriyan , linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH] proc: faster /proc/*/status Message-Id: <20160809162504.2db8051c15afd5618c4b7d7e@linux-foundation.org> In-Reply-To: <1470604951.28648.44.camel@perches.com> References: <20160806125608.GB1187@p183.telecom.by> <87ziop46b8.fsf@tassilo.jf.intel.com> <20160807085322.GB1871@p183.telecom.by> <20160807165947.GX5871@two.firstfloor.org> <1470591565.28648.40.camel@perches.com> <20160807174402.GY5871@two.firstfloor.org> <1470604951.28648.44.camel@perches.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 07 Aug 2016 14:22:31 -0700 Joe Perches wrote: > On Sun, 2016-08-07 at 10:44 -0700, Andi Kleen wrote: > > > > > It is so bloated that gcc needs to be asked to not screw up with stack > > > > > size. > > > > What happens when you drop all the noinlines for this? I assume > > > > this would alread make it faster. And now that we have bigger > > > > stacks we can likely tolerate it. > > > %pV recurses through these code paths. > > > I believe the maximum current recursion depth is 3. > > I assume 2 max would sufficient for all users in kernel. > > > > And perhaps it would be better to get rid of "features" like this, > > and instead focus on more common cases. > > It'd be a dubious trade-off in my opinion. > > Overall code size has been reduced by hundreds of KB > by using %pV. I kinda like Alexey's patch just for aesthetic reasons. Those huge straggly printk-style statements are a real pain to maintain, trying to keep the control string and the args in sync. Especially when there are ifdefs everywhere - take a look at meminfo_proc_show() and weep. Geeze the number of times I've had to maintain (and screw up) conflicts in that thing...