|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/gnttab: Shrink struct gnttab_copy_buf
On 03.11.2026 14:01, Andrew Cooper wrote:
> Move the booleans into earlier padding. No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> On arm32, it's 40 bytes before and after. Given that we can't reuse the
> tail-padding from struct gnttab_copy_ptr, I'm not sure there's an obvious
> improvement to be had:
>
> xen.git/xen$ pahole xen-syms-arm32-after -E -C gnttab_copy_buf
> struct gnttab_copy_buf {
> struct gnttab_copy_ptr {
> union {
> /* typedef grant_ref_t -> uint32_t */ unsigned int
> ref; /* 0 4 */
> /* typedef xen_pfn_t -> uint64_t */ long long
> unsigned int gmfn; /* 0 8 */
> } u;
> /* 0 8 */
> /* typedef domid_t -> uint16_t */ short unsigned int domid;
> /* 8 2 */
> /* typedef uint16_t */ short unsigned int offset;
> /* 10 2 */
> }ptr; /* 0 16 */
>
> /* XXX last struct has 4 bytes of padding */
>
> /* typedef uint16_t */ short unsigned int len;
> /* 16 2 */
> _Bool read_only;
> /* 18 1 */
> _Bool have_grant;
> /* 19 1 */
> _Bool have_type;
> /* 20 1 */
Making these bitfields would help Arm32.
Jan
PS: Can we also get the other pending gnttab change sorted? As said,
feel free to post your patch, and I'll ack it. Alternatively an ack
on my variant would be nice.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |