From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01198C4363A for ; Fri, 30 Oct 2020 12:34:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9008A221FF for ; Fri, 30 Oct 2020 12:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbgJ3Me2 (ORCPT ); Fri, 30 Oct 2020 08:34:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:53202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgJ3MeD (ORCPT ); Fri, 30 Oct 2020 08:34:03 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E7D6221FF; Fri, 30 Oct 2020 12:34:00 +0000 (UTC) Date: Fri, 30 Oct 2020 08:33:58 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Thomas Gleixner , LKML , Ingo Molnar , kan.liang@linux.intel.com, like.xu@linux.intel.com, Andy Lutomirski Subject: Re: [PATCH] perf/arch: Remove perf_sample_data::regs_user_copy Message-ID: <20201030083358.4c771278@oasis.local.home> In-Reply-To: <20201030105917.GI2611@hirez.programming.kicks-ass.net> References: <20201030002722.766a22df@oasis.local.home> <20201030090037.GZ2628@hirez.programming.kicks-ass.net> <877dr8nh6u.fsf@nanos.tec.linutronix.de> <20201030105917.GI2611@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Oct 2020 11:59:17 +0100 Peter Zijlstra wrote: > On Fri, Oct 30, 2020 at 11:26:01AM +0100, Thomas Gleixner wrote: > > What's worse is perf_sample_data which is 384 bytes and is 64 bytes aligned. > > Here; this shrinks it to 192 bytes. Combined with the static dummy this > should reduce stack usage by 360 bytes. > > --- > Subject: perf/arch: Remove perf_sample_data::regs_user_copy > > struct perf_sample_data lives on-stack, we should be careful about it's > size. Furthermore, the pt_regs copy in there is only because x86_64 is a > trainwreck, solve it differently. > > Halves sizeof(perf_sample_data). > > I tested with just this patch and it doesn't crash when running function tracing and perf simultaneously. -- Steve