All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ronald G Minnich <rminnich@lanl.gov>
To: Jimi Xenidis <jimix@watson.ibm.com>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com,
	Andrei Petrov <andrei@xensource.com>,
	Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: 32/64-bit hypercall interface
Date: Fri, 30 Sep 2005 14:05:47 -0600	[thread overview]
Message-ID: <433D9A9B.3050103@lanl.gov> (raw)
In-Reply-To: <17213.23513.807124.448770@kitch0.watson.ibm.com>

Jimi Xenidis wrote:

>  KF> When we previously had this, by defining packed structs, there were 
>  KF> plenty of screams that it wasn't ANSI compliant, and that performance 
>  KF> sucks on some architectures.
> 
> Tou use a research term, "thats just ka-ka" :)
> Packed in no way solves the problem of selecting the appropriate types.

no, it's not ka ka at all. I had huge troubles with plan 9 c and the way 
that the linux structs were packed via the use of gcc struct packing. I 
am really glad packed went away.

The fact is, Xen has had trouble for me at times, as it is very 
linux/gcc specific. The one that hit me the hardest was exception 
frames, and second hardest was the packed keyword. I had to write 
marshall/unmarshall functions on Plan 9, just as though I were using 
RPC. It worked out, though, since (see below) I was able to end up with 
structs with better alignment.

I thank the Xen team for removing packed structs. It was a good move.

Also, there was some packing that resulted in very suboptimal structure 
member alignment. In one case, for one struct, a long struct member was 
odd-byte-aligned 1/2 the time, odd-short-aligned 1/4 the time, and 
correctly aligned 1/4 the time. There's no reason to do this.

There was also a lot of research disagreement on the plan 9 list about 
packing, when I brought this issue up; it's not like all the angels sing 
from the gcc hymnal. Comments ranged from the politest,  along the lines 
of "using packed is bad design", to less polite :-)

There are lots of good arguments on both sides. But it really boils down 
to, 'which is most portable, using packed or not'. The answer is, not.

thanks

ron

  reply	other threads:[~2005-09-30 20:05 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-29 13:56 32/64-bit hypercall interface Ian Pratt
2005-09-29 18:17 ` Hollis Blanchard
2005-09-29 20:12   ` Hollis Blanchard
2005-09-29 22:26     ` Keir Fraser
2005-09-29 22:43     ` Keir Fraser
2005-09-30  0:54       ` Andrei Petrov
2005-09-30  8:03         ` Keir Fraser
2005-09-30 15:38           ` Jimi Xenidis
2005-09-30 20:05             ` Ronald G Minnich [this message]
2005-09-30 20:28               ` Hollis Blanchard
2005-09-30 20:39                 ` Ronald G Minnich
2005-09-30 15:39           ` Hollis Blanchard
2005-09-30 15:45             ` Keir Fraser
2005-09-30 16:34               ` Hollis Blanchard
2005-09-30 16:42                 ` Keir Fraser
2005-09-30 17:03                   ` Hollis Blanchard
2005-10-01  1:33                   ` Jeremy Katz
2005-10-03 19:34                   ` Kip Macy
2005-09-30 16:44                 ` David
2005-09-30 16:44                   ` Keir Fraser
2005-09-30 16:57                   ` Hollis Blanchard
2005-09-30 16:55               ` Andrei Petrov
2005-10-03 18:18 ` Hollis Blanchard
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04 21:51 Nakajima, Jun
2005-10-04 22:47 ` Hollis Blanchard
2005-10-04 16:03 Nakajima, Jun
2005-10-04 16:45 ` Andi Kleen
2005-10-03 22:03 Ian Pratt
2005-10-04 18:05 ` Hollis Blanchard
2005-10-05 10:22   ` Keir Fraser
2005-10-03 21:24 Nakajima, Jun
2005-10-04 12:11 ` Andi Kleen
2005-10-04 16:15 ` Hollis Blanchard
2005-10-03 19:56 Ian Pratt
2005-10-03 20:04 ` Jeremy Katz
2005-10-03 21:11 ` Hollis Blanchard
2005-10-03 22:00   ` Keir Fraser
2005-10-04 16:27     ` Hollis Blanchard
2005-10-04 12:08 ` Andi Kleen
2005-10-03 19:11 Nakajima, Jun
2005-10-03 19:28 ` Hollis Blanchard
2005-10-02 21:21 Ian Pratt
2005-10-01 18:25 Nakajima, Jun
2005-10-03 16:11 ` Jeremy Katz
2005-09-28 21:36 Hollis Blanchard
2005-09-29  9:00 ` Keir Fraser
2005-09-29 12:41   ` Jimi Xenidis
2005-09-29 13:13     ` Keir Fraser

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=433D9A9B.3050103@lanl.gov \
    --to=rminnich@lanl.gov \
    --cc=andrei@xensource.com \
    --cc=hollisb@us.ibm.com \
    --cc=jimix@watson.ibm.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.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.