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

Re: [Xen-devel] [PATCH v2 06/45] xen/arm: gic: Split the field state in gic_lr in 2 fields active and pending



Hi,

On 16/03/18 22:52, Stefano Stabellini wrote:
> On Fri, 16 Mar 2018, Julien Grall wrote:
>> On 16/03/2018 21:34, Stefano Stabellini wrote:
>>> On Thu, 15 Mar 2018, Andre Przywara wrote:
>>>> From: Julien Grall <julien.grall@xxxxxxx>
>>>> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
>>>> index daec51499c..c32861d4fa 100644
>>>> --- a/xen/include/asm-arm/gic.h
>>>> +++ b/xen/include/asm-arm/gic.h
>>>> @@ -209,7 +209,8 @@ struct gic_lr {
>>>>      /* Virtual IRQ */
>>>>      uint32_t virq;
>>>>      uint8_t priority;
>>>> -   uint8_t state;
>>>> +   bool active;
>>>> +   bool pending;
>>>>      bool hw_status;
>>>>   };
>>>
>>> I like the readability but dislike the increase memory usage. I would
>>> have kept a single uint8_t and I would have used status flags as an
>>> approach, maybe I would have improved on those flags.
>>
>> Why is that important? gic_lr will only be allocated on the stack...
> 
> You are right, so it is even less important than I thought.

... especially given that this patch increases it from 11 to 12 bytes,
just to fill up the padding. And actually patch 04 decreased the size of
the structure by that one byte.
So it was 12 bytes before this series, is 12 bytes after this patch and
will be 12 bytes after the whole series.
So actually no change at all.

> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

Thanks!

Andre.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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