From: Avi Kivity <avi@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Zach Brown <zach.brown@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: packing structures and numbers
Date: Sun, 05 Oct 2008 07:31:57 +0200 [thread overview]
Message-ID: <48E8514D.9060909@redhat.com> (raw)
In-Reply-To: <87prmgnwsv.fsf@basil.nowhere.org>
Andi Kleen wrote:
>> On those archs that take faults on unaligned accesses it's unlikely to
>> be in the noise. But we could (and should) stick a get_unaligned() in
>> the accessor functions.
>>
>
> Normally the compiler on such architectures generates special load/store code
> for known unaligned types that does not actually fault, but just uses multiple
> instructions. That is slower than a normal memory access, but still much
> faster than a exception.
>
> You only really get the full exception fault penalty when the compiler
> cannot figure out at compile time that a given variable is unaligned.
> But with packed it normally assumes that (I think)
Sounds reasonable. In which case the unaligned access issue I raised is
a red herring. So using uleb128 or not is down to whether the improved
packing efficiency is worth the increased complexity; it seems unlikely
that it is.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
prev parent reply other threads:[~2008-10-05 5:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 11:42 packing structures and numbers Avi Kivity
2008-10-03 12:22 ` Chris Mason
2008-10-03 13:40 ` Avi Kivity
2008-10-04 0:22 ` Daniel Phillips
2008-10-04 0:28 ` Chris Mason
2008-10-04 0:35 ` Daniel Phillips
2008-10-04 0:43 ` Daniel Phillips
2008-10-04 8:27 ` Avi Kivity
2008-10-03 18:37 ` Zach Brown
2008-10-04 8:31 ` Avi Kivity
2008-10-04 16:34 ` Andi Kleen
2008-10-05 5:31 ` Avi Kivity [this message]
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=48E8514D.9060909@redhat.com \
--to=avi@redhat.com \
--cc=andi@firstfloor.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zach.brown@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox