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

RE: [Xen-ia64-devel] [PATCH] xentrace buffer alignment


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Thu, 24 Nov 2005 22:08:01 +0800
  • Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 24 Nov 2005 14:07:52 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcXxADcoGIxOvXUQTBGVmgaL6YDpqwAADTsA
  • Thread-topic: [Xen-ia64-devel] [PATCH] xentrace buffer alignment

>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2005年11月24日 22:11
>
>On 24 Nov 2005, at 13:54, Tian, Kevin wrote:
>
>>> From: Tian, Kevin
>>> Sent: 2005年11月24日 21:52
>>>
>>>     So t_rec will be placed at middle of 8 bytes boundary by t_recs[i] =
>>> (struct t_rec
>>> *)(buf + 1). Then later access to 64bit field within t_rec is
>>> unaligned access.
>>>
>>
>> Then another way is to modify above code to let type cast upon address
>> aligned to next structure (t_recs)
>
>Yeah, that pointer arithmetic plus cast is gross. Also the way in which
>trace-buffer locations are computed by user space tools (e.g.,
>xentrace) is nasty. I'll have a think about properly cleaning up the
>layout.
>
>For now, I'll remove the unused 'nr_recs' field from the t_buf, and
>that will just happen to get you the correct alignment. Not very nice,
>but it'll do until I relay things out.
>
>  -- Keir

Sounds good. ;-)

Thanks,
Kevin

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.