linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [for-next][PATCH 12/17] fgraph: Make overruns 4 bytes in graph stack structure
Date: Thu, 12 Nov 2020 09:39:15 -0500	[thread overview]
Message-ID: <20201112093915.16a42644@gandalf.local.home> (raw)
In-Reply-To: <aabe0dd1fd7b46aaaadb2b34912b6718@AcuMS.aculab.com>

On Thu, 12 Nov 2020 09:18:21 +0000
David Laight <David.Laight@ACULAB.COM> 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

  reply	other threads:[~2020-11-12 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12  0:32 [for-next][PATCH 00/17] tracing: Updates for 5.11 Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 01/17] ftrace: Move the recursion testing into global headers Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 02/17] ftrace: Add ftrace_test_recursion_trylock() helper function Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 03/17] ftrace: Optimize testing what context current is in Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 04/17] pstore/ftrace: Add recursion protection to the ftrace callback Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 05/17] kprobes/ftrace: " Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 06/17] livepatch/ftrace: " Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 07/17] livepatch: Trigger WARNING if livepatch function fails due to recursion Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 08/17] perf/ftrace: Add recursion protection to the ftrace callback Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 09/17] perf/ftrace: Check for rcu_is_watching() in callback function Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 10/17] ftrace: Reverse what the RECURSION flag means in the ftrace_ops Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 11/17] ftrace: Add recording of functions that caused recursion Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 12/17] fgraph: Make overruns 4 bytes in graph stack structure Steven Rostedt
2020-11-12  9:18   ` David Laight
2020-11-12 14:39     ` Steven Rostedt [this message]
2020-11-12  0:32 ` [for-next][PATCH 13/17] ftrace: Clean up the recursion code a bit Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 14/17] ring-buffer: Add recording of ring buffer recursion into recursed_functions Steven Rostedt
2020-11-12  0:32 ` [for-next][PATCH 15/17] ftrace: Remove unused varible ret Steven Rostedt
2020-11-12  0:33 ` [for-next][PATCH 16/17] tracing: Fix some typos in comments Steven Rostedt
2020-11-12  0:33 ` [for-next][PATCH 17/17] MAINTAINERS: assign ./fs/tracefs to TRACING Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201112093915.16a42644@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).