tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: -falign-functions=16 for i386/amd64



Ryota Ozaki writes:
> On Thu, Sep 1, 2016 at 4:04 PM, matthew green <mrg%eterna.com.au@localhost> wrote:
> > have you tested other values than 1 and 16?  what about 4 or 8?
> 
> 4 and 8 are not so good; their performance fluctuations are
> similar to the unaligned case in my experiments.
> 
> >
> > can you post the size difference of kernels?  particularly the
> > kernel without DIAGNOSTIC or DEBUG (since those are the ones
> > where performance matters most.)
> 
> I measured the sizes of GENERIC kernels, i.e., DIAGNOSTIC on
> and DEBUG off.

DIAGNOSTIC is enabled on most -current GENERIC kernels including
the amd64 one.  it's disabled on release branches.

> The sizes of kernel binaries don't change in most cases because
> the alignment of __rodata_start that begins just after kernel text
> hides the changes due to -falign-functions.
> 
> The sizes of the actual kernel text (from kernel_text to _etext)
> slightly changes. The difference between that of GENERIC kernels
> w/ and w/o -falign-functions=16 is 200kB. That is 1% of the total
> kernel text size.
> 
> BTW, as I noted, I'm not exploring an alignment size that provides
> best performance, I just want to reduce performance fluctuations.

200KB is a lot of text.  that's a non trivial i-cache issue.

what are the CPU specifics of the system you're testing on?
can you run performance tests on systems with small cache?

thanks.


.mrg.


Home | Main Index | Thread Index | Old Index