From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbcHGQ7v (ORCPT ); Sun, 7 Aug 2016 12:59:51 -0400 Received: from one.firstfloor.org ([193.170.194.197]:50653 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbcHGQ7u (ORCPT ); Sun, 7 Aug 2016 12:59:50 -0400 Date: Sun, 7 Aug 2016 09:59:47 -0700 From: Andi Kleen To: Alexey Dobriyan Cc: Andi Kleen , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH] proc: faster /proc/*/status Message-ID: <20160807165947.GX5871@two.firstfloor.org> References: <20160806125608.GB1187@p183.telecom.by> <87ziop46b8.fsf@tassilo.jf.intel.com> <20160807085322.GB1871@p183.telecom.by> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160807085322.GB1871@p183.telecom.by> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. -Andi -- ak@linux.intel.com -- Speaking for myself only.