[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52768311F5FA320283B06C358C6B9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 28 Apr 2023 06:43:00 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: "Chatre, Reinette" <reinette.chatre@...el.com>,
"jgg@...dia.com" <jgg@...dia.com>,
"yishaih@...dia.com" <yishaih@...dia.com>,
"shameerali.kolothum.thodi@...wei.com"
<shameerali.kolothum.thodi@...wei.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"darwi@...utronix.de" <darwi@...utronix.de>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Jiang, Dave" <dave.jiang@...el.com>,
"Liu, Jing2" <jing2.liu@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"tom.zanussi@...ux.intel.com" <tom.zanussi@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V4 08/11] vfio/pci: Use bitfield for struct
vfio_pci_core_device flags
> From: Chatre, Reinette <reinette.chatre@...el.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@...dia.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@...el.com>
Reviewed-by: Kevin Tian <kevin.tian@...el.com>
Powered by blists - more mailing lists