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 577DFC2D0A3 for ; Thu, 12 Nov 2020 14:39:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5E9A2224A for ; Thu, 12 Nov 2020 14:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728460AbgKLOjS (ORCPT ); Thu, 12 Nov 2020 09:39:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:49236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgKLOjR (ORCPT ); Thu, 12 Nov 2020 09:39:17 -0500 Received: from gandalf.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 ABC2322240; Thu, 12 Nov 2020 14:39:16 +0000 (UTC) Date: Thu, 12 Nov 2020 09:39:15 -0500 From: Steven Rostedt To: David Laight Cc: "linux-kernel@vger.kernel.org" , Ingo Molnar , Andrew Morton Subject: Re: [for-next][PATCH 12/17] fgraph: Make overruns 4 bytes in graph stack structure Message-ID: <20201112093915.16a42644@gandalf.local.home> In-Reply-To: References: <20201112003244.764326960@goodmis.org> <20201112003334.906341178@goodmis.org> 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 Thu, 12 Nov 2020 09:18:21 +0000 David Laight wrote: > From: Steven Rostedt > > Sent: 12 November 2020 00:33 > > > > Inspecting the data structures of the function graph tracer, I found that > > the overrun value is unsigned long, which is 8 bytes on a 64 bit machine, > > and not only that, the depth is an int (4 bytes). The overrun can be simply > > an unsigned int (4 bytes) and pack the ftrace_graph_ret structure better. > > > > The depth is moved up next to the func, as it is used more often with func, > > and improves cache locality. > ... > > } __packed; > > Does this many any/much difference given that the structure is > marked __packed? > > OTOH the __packed will (probably) kill performance on systems > that don't support mis-aligned accesses. > I think you answered your own question ;-) That was why I try to keep 4 byte items together. But the point here was that overrun is hardly ever used (probably could just be a single byte), and there was no reason for it to be a long. -- Steve