Re: [PATCH pahole 4/4] reorganize: shift tail members for non-bitfields only

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

 



Em Wed, Apr 03, 2019 at 09:12:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Apr 03, 2019 at 09:07:47PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Apr 03, 2019 at 02:50:14PM -0700, Andrii Nakryiko escreveu:
> > > On Wed, Apr 3, 2019 at 2:36 PM Arnaldo Carvalho de Melo <arnaldo.melo@xxxxxxxxx> wrote:
> > > > Em Wed, Apr 03, 2019 at 06:06:18PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > [acme@quaco pahole]$ pahole -F btf --packable vmlinux  | cut -f 1 | while read struct ; do pahole -F btf -C $struct --reorganize vmlinux | grep BRAIN ; done
> > > >         /* BRAIN FART ALERT! 200 bytes != 176 (member bytes) + 0 (member bits) + 80 (byte holes) + 0 (bit holes), diff = -448 bits */
> > > >         /* BRAIN FART ALERT! 760 bytes != 756 (member bytes) + 0 (member bits) + 4 (byte holes) + 0 (bit holes), diff = -32 bits */
> > > >         /* BRAIN FART ALERT! 72 bytes != 28 (member bytes) + 0 (member bits) + 100 (byte holes) + 0 (bit holes), diff = -448 bits */
> > > >         /* BRAIN FART ALERT! 40 bytes != 36 (member bytes) + 0 (member bits) + 44 (byte holes) + 0 (bit holes), diff = -352 bits */
> > > >         /* BRAIN FART ALERT! 184 bytes != 182 (member bytes) + 0 (member bits) + 6 (byte holes) + 0 (bit holes), diff = -32 bits */
> > > > [acme@quaco pahole]$ pahole -F btf --packable vmlinux  | wc -l
> > > > 503
> > > > [acme@quaco pahole]$
> > > >
> > > > 1% getting closer...
> > > >
> > > > [acme@quaco pahole]$ pahole -F btf --reorganize -C netns_frags vmlinux
> > > > struct netns_frags {
> > > >         long int                   high_thresh;          /*     0     8 */
> > > >         long int                   low_thresh;           /*     8     8 */
> > > >         int                        timeout;              /*    16     4 */
> > > >         int                        max_dist;             /*    20     4 */
> > > >         struct inet_frags *        f;                    /*    24     8 */
> > > >         atomic_long_t              mem;                  /*    32     8 */
> > > >
> > > >         /* XXX 24 bytes hole, try to pack */
> > > >
> > > >         /* --- cacheline 1 boundary (64 bytes) --- */
> > > >         struct rhashtable          rhashtable;           /*    64   136 */
> > > >
> > > >         /* XXX 56 bytes hole, try to pack */
> > > 
> > > This one is strange, there should be no hole. Will take a look.
> > 
> > So I've pushed everything to my master branch, removed the last patch of
> > your latest series, and have some patches I've worked on to take
> > advantage of DW_AT_alignment, and the ones at the end are the 1% of the
> > ones that currently are considered --packable.
> > 
> > The problem seems to be related to the last member hole, which should
> > probably be just trowed away at the end, together with fixing up the
> > class size.
> 
> Mid-air colision:
> 
> I'm assuming the first three patches are the same as before, with the
> 4th applied (I had already dropped the 4th of the v1 series), all seems
> clear:

[acme@quaco pahole]$ pahole -F btf --packable vmlinux  | cut -f 1 | while read s ; do pahole -F btf -C $s --reorganize vmlinux ; done | grep BRAIN
[acme@quaco pahole]$

[acme@quaco pahole]$ pahole -F btf --packable examples/vmlinux-aarch64  | cut -f 1 | while read s ; do pahole -F btf -C $s --reorganize examples/vmlinux-aarch64 ; done | grep BRAIN
[acme@quaco pahole]$

Cool, closer to v1.13.

- Arnaldo



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux