All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Cc: xfs@oss.sgi.com, tes@sgi.com, dgc@sgi.com
Subject: Re: [RFC][PATCH 1/1] XFS: annotate all on-disk structures with __ondisk
Date: Mon, 17 Mar 2008 22:34:57 -0500	[thread overview]
Message-ID: <47DF3861.6020308@sandeen.net> (raw)
In-Reply-To: <1205800745-9217-1-git-send-email-jeffpc@josefsipek.net>

Josef 'Jeff' Sipek wrote:
> Currently, the annotation just forces the structures to be packed, and
> 4-byte aligned.

Semantic nitpick: in my definition of "annotation" this is more than
just an annotation.

An "__ondisk" annotation, to me, would allow something like sparse to
verify properly laid out on-disk structures, but would not affect the
actual runtime code - I think that would be quite useful.  However, this
 change actually impacts the bytecode; it is a functional change.

So I really do understand what you're trying to do, despite my
protestations.  If there is some magical instruction to gcc which:

a) leaves all current "non-broken" ABIs and gcc implementations'
bytecode untouched (or at the very least, minimally/trivially modified), and

b) fixes all possible future ABIs so they will always have things
perfectly and properly aligned, again w/o undue molestation of the
resulting bytecode

then I could probably be convinced.  :)  But this seems like a tall
order, and would require much scrutiny.

I'm just very shy of a sweeping change like this, which has a material
impact on the most common architectures, and does not actually provide,
as far as I can see, any benefit to them - only risk.

And for now I'll shut up and let the sgi guys chime in eventually.  :)

-Eric

> Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
> 
> ---
> This is just an RFC, and the alignment needs to be verified against the
> offsets within the pages read from disk, and more xfsqa runs on various
> architectures are needed. (I don't want to be responsible for something like
> the bitops regression on ppc!)
> 
> The .text segment shrinks on x86 and s390x, but grows in ia64 (3776 bytes ==
> 0.3%).
> 
>    text    data     bss     dec     hex filename
>  542054    3171    3084  548309   85dd5 xfs-x86-original.ko
>  542026    3171    3084  548281   85db9 xfs-x86-packed-aligned4.ko
> 1244057   70858    2480 1317395  141a13 xfs-ia64-original.ko
> 1247833   70858    2480 1321171  1428d3 xfs-ia64-packed-aligned4.ko
>  679901   19374    3112  702387   ab7b3 xfs-s390x-original.ko
>  679781   19374    3112  702267   ab73b xfs-s390x-packed-aligned4.ko
> 
> The approximate number of instructions effectively stays the same on x86
> (goes up by 2), s390x gets smaller (by 12 instructions), but ia64 bloats by
> 708 instructions (0.34%).
> 
> $ for x in *.ko; do objdump -d $x > `basename $x .ko`.dis ; done
> $ wc -l *.dis
>   141494 xfs-x86-original.dis
>   141496 xfs-x86-packed-aligned4.dis
>   208514 xfs-ia64-original.dis
>   209222 xfs-ia64-packed-aligned4.dis
>   121544 xfs-s390x-original.dis
>   121532 xfs-s390x-packed-aligned4.dis
> 
> I could try to compile things on a sparc64, mips, and x86_64, but that's for
> another day - and depending on where this thread will lead.
> 
> The patch keeps xfsqa happy on x86 - well, it dies in the 100-range, but I
> haven't had the time to check if that happens without this patch. Someone
> (not it!) should nurse xfsqa back to health :)
> 
> Jeff.

  reply	other threads:[~2008-03-18  3:34 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15  3:24 [PATCH] fix dir2 shortform structures on ARM old ABI Eric Sandeen
2008-03-15  4:17 ` Josef 'Jeff' Sipek
2008-03-15  4:23   ` Eric Sandeen
2008-03-15  4:27     ` Josef 'Jeff' Sipek
2008-03-15  4:33       ` Eric Sandeen
2008-03-15  4:51         ` Josef 'Jeff' Sipek
2008-03-17 18:32           ` Eric Sandeen
2008-03-17 19:53             ` Josef 'Jeff' Sipek
2008-03-17 20:04               ` Eric Sandeen
2008-03-17 20:28                 ` Josef 'Jeff' Sipek
2008-03-18  0:39                   ` [RFC][PATCH 1/1] XFS: annotate all on-disk structures with __ondisk Josef 'Jeff' Sipek
2008-03-18  3:34                     ` Eric Sandeen [this message]
2008-03-18  4:09                       ` David Chinner
2008-03-18  5:28                         ` Josef 'Jeff' Sipek
2008-03-17 23:35             ` [PATCH] fix dir2 shortform structures on ARM old ABI Timothy Shimmin
2008-03-17 23:42               ` Josef 'Jeff' Sipek
2008-03-18  4:31                 ` Timothy Shimmin
     [not found]     ` <20080315043622.GA11547@puku.stupidest.org>
2008-03-15  4:45       ` Eric Sandeen
2008-03-20  3:02 ` Eric Sandeen
2008-05-05  7:38   ` Barry Naujok
2008-06-06 14:15   ` Eric Sandeen
2008-04-09 19:53 ` Eric Sandeen
2008-04-23  0:58 ` Eric Sandeen
2008-05-02 20:55   ` Eric Sandeen
2008-05-05  7:08     ` David Chinner
2008-05-05 13:07       ` Eric Sandeen
2008-05-06  4:21       ` Timothy Shimmin
2008-05-06 13:43         ` Eric Sandeen
2008-06-05  5:38           ` Eric Sandeen
2008-06-05  5:46             ` Mark Goodwin
2008-06-05  5:49               ` Eric Sandeen
2008-06-05  6:02                 ` Mark Goodwin
2008-06-05  6:04                   ` Mark Goodwin
2008-06-05  6:06                   ` Eric Sandeen
2008-06-05  5:49             ` Chris Wedgwood
2008-06-05  5:52               ` Eric Sandeen
2008-06-05  6:34               ` Eric Sandeen

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=47DF3861.6020308@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=dgc@sgi.com \
    --cc=jeffpc@josefsipek.net \
    --cc=tes@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.