lkml.org 
[lkml]   [2020]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [for-next][PATCH 12/17] fgraph: Make overruns 4 bytes in graph stack structure
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

\
 
 \ /
  Last update: 2020-11-12 15:39    [W:0.067 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site