[PATCH v2 1/4] powerpc/pseries/vas: Define global hv_cop_caps struct

Haren Myneni haren at linux.ibm.com
Wed Feb 9 03:00:56 AEDT 2022


On Tue, 2022-02-08 at 09:48 -0600, Nathan Lynch wrote:
> Haren Myneni <haren at linux.ibm.com> writes:
> > The coprocessor capabilities struct is used to get default and
> > QoS capabilities from the hypervisor during init, DLPAR event and
> > migration. So instead of allocating this struct for each event,
> > define global struct and reuse it, especially eliminate memory
> > allocation failure during migration.
> 
> Which allows the migration code to avoid adding an error path. I
> could
> go either way, but this approach seems fine to me assuming all users
> of
> the global object are guarded by an appropriate lock.
> 
> Acked-by: Nathan Lynch <nathanl at linux.ibm.com>
> 

Thanks for your suggestion. I will change the commit message as you
suggested to make it clear. yes, this struct is accessed with mutex. 

Thanks
Haren



More information about the Linuxppc-dev mailing list