Re: [PATCH 3/4] hugetlb: add private bit-field to kobject structure

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

 



On Wed, Jul 29, 2009 at 02:11:58PM -0400, Lee Schermerhorn wrote:
> PATCH/RFC 3/4 hugetlb:  add private bitfield to struct kobject
> 
> Against: 2.6.31-rc3-mmotm-090716-1432
> atop the previously posted alloc_bootmem_hugepages fix.
> [http://marc.info/?l=linux-mm&m=124775468226290&w=4]
> 
> For the per node huge page attributes, we want to share
> as much code as possible with the global huge page attributes,
> including the show/store functions.  To do this, we'll need a
> way to back translate from the kobj argument to the show/store
> function to the node id, when entered via that path.  This
> patch adds a subsystem/sysdev private bitfield to the kobject
> structure.  The bitfield uses unused bits in the same unsigned
> int as the various kobject flags so as not to increase the size
> of the structure. 
> 
> Currently, the bit field is the minimum required for the huge
> pages per node attributes [plus one extra bit].  The field could
> be expanded for other usage, should such arise.
> 
> Note that this is not absolutely required.  However, using this
> private field eliminates an inner loop to scan the per node
> hstate kobjects and eliminates scanning entirely for the global
> hstate kobjects.

Ick, no, please don't do that.  That's what the structure you use to
contain your kobject should be for, right?

Or are you for some reason using "raw" kobjects?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux