Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbcDTXKW (ORCPT ); Wed, 20 Apr 2016 19:10:22 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:34477 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbcDTXKU (ORCPT ); Wed, 20 Apr 2016 19:10:20 -0400 Subject: Re: [PATCH/RFC] perf core: Allow setting up max frame stack depth via sysctl To: Arnaldo Carvalho de Melo , Peter Zijlstra References: <20160420224730.GX3677@kernel.org> Cc: Frederic Weisbecker , Ingo Molnar , Adrian Hunter , Brendan Gregg , Alexander Shishkin , Alexei Starovoitov , He Kuang , Jiri Olsa , Masami Hiramatsu , Milian Wolff , Namhyung Kim , Stephane Eranian , Thomas Gleixner , Vince Weaver , Wang Nan , Zefan Li , Linux Kernel Mailing List From: David Ahern Message-ID: <57180C59.4010803@gmail.com> Date: Wed, 20 Apr 2016 17:10:17 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160420224730.GX3677@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 33 On 4/20/16 4:47 PM, Arnaldo Carvalho de Melo wrote: > The new file is: > > # cat /proc/sys/kernel/perf_event_max_stack > 127 > > Chaging it: > > # echo 256 > /proc/sys/kernel/perf_event_max_stack > # cat /proc/sys/kernel/perf_event_max_stack > 256 > > But as soon as there is some event using callchains we get: > > # echo 512 > /proc/sys/kernel/perf_event_max_stack > -bash: echo: write error: Device or resource busy > # > > Because we only allocate the callchain percpu data structures when there > is a user, which allows for changing the max easily, its just a matter > of having no callchain users at that point. > > Reported-by: Brendan Gregg > Link: http://lkml.kernel.org/n/tip-cgls6uuncwjtq969tys1j6b0@git.kernel.org > Signed-off-by: Arnaldo Carvalho de Melo > I would love to see something like this go in. Right now I have to recompile the kernel because I want a lower max count. In the past we talked about about making this part of the attribute with separate controls for both kernel stack and userspace stack. Have you given up on that option?