[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 10/18] x86/mem_sharing: Convert MEM_SHARING_DESTROY_GFN to a bool
On Thu, Jan 23, 2020 at 9:14 AM George Dunlap <george.dunlap@xxxxxxxxxx> wrote: > > On 1/21/20 5:49 PM, Tamas K Lengyel wrote: > > MEM_SHARING_DESTROY_GFN is used on the 'flags' bitfield during unsharing. > > However, the bitfield is not used for anything else, so just convert it to a > > bool instead. > > > > Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx> > > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > > But is there a particular advantage to getting rid of the bitfield? > > You're the maintainer, so it's your decision of course. But if it were > me I'd leave it as a bitfield so that all the bitfield code is there if > it's needed in the future. Flipping it to a bool, with the risk of > flipping it back to a bitfield later, seems like pointless churn to me. > > (Although perhaps the reason will become evident by the time I get to > the end of the series.) Provided its been many years since this code has been added with no need for any extra bits, and with no expectations that this would change any time soon, I wouldn't worry about that. True, there is very little difference between keeping the code as-is vs converting it to bool, but IMHO it makes the code easier to follow without you wondering what might be those non-existent situations that warranted it to be a bitmap to begin with. Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |