From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbcHGRjb (ORCPT ); Sun, 7 Aug 2016 13:39:31 -0400 Received: from smtprelay0102.hostedemail.com ([216.40.44.102]:55321 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751713AbcHGRj3 (ORCPT ); Sun, 7 Aug 2016 13:39:29 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:152:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2197:2199:2393:2559:2562:2691:2827:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3873:3874:4321:5007:6119:7774:7903:8603:10004:10400:10848:11026:11232:11658:11783:11914:12043:12296:12517:12519:12740:13069:13311:13357:13894:14659:14721:21080:21221:30012:30046:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: month51_528abe9acec3d X-Filterd-Recvd-Size: 2058 Message-ID: <1470591565.28648.40.camel@perches.com> Subject: Re: [PATCH] proc: faster /proc/*/status From: Joe Perches To: Andi Kleen , Alexey Dobriyan Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk Date: Sun, 07 Aug 2016 10:39:25 -0700 In-Reply-To: <20160807165947.GX5871@two.firstfloor.org> References: <20160806125608.GB1187@p183.telecom.by> <87ziop46b8.fsf@tassilo.jf.intel.com> <20160807085322.GB1871@p183.telecom.by> <20160807165947.GX5871@two.firstfloor.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2016-08-07 at 09:59 -0700, Andi Kleen wrote: > > And then what? Parsing format string is still be there. > Perhaps could have a fast path for simple cases. > > > > This is first line of profile of the first function (format_decode) > > > >        │     static noinline_for_stack > >        │     int format_decode(const char *fmt, struct printf_spec *spec) > >        │     { > >  10.38 │       push   %rbp <=== > >   1.07 │       mov    %rsp,%rbp > >   1.09 │       push   %r12 > >   4.51 │       mov    %rsi,%r12 > >   1.40 │       push   %rbx > >   1.86 │       mov    %rdi,%rbx > >        │       sub    $0x8,%rsp > > > > 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.