lkml.org 
[lkml]   [2023]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V4 08/11] vfio/pci: Use bitfield for struct vfio_pci_core_device flags
Date
> From: Chatre, Reinette <reinette.chatre@intel.com>
> Sent: Friday, April 28, 2023 1:36 AM
>
> struct vfio_pci_core_device contains eleven boolean flags.
> Boolean flags clearly indicate their usage but space usage
> starts to be a concern when there are many.
>
> An upcoming change adds another boolean flag to
> struct vfio_pci_core_device, thereby increasing the concern
> that the boolean flags are consuming unnecessary space.
>
> Transition the boolean flags to use bitfields. On a system that
> uses one byte per boolean this reduces the space consumed
> by existing flags from 11 bytes to 2 bytes with room for
> a few more flags without increasing the structure's size.
>
> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>

\
 
 \ /
  Last update: 2023-04-28 08:43    [W:0.126 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site