linux-numa.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: linux-mm@kvack.org, linux-numa@vger.kernel.org,
	akpm@linux-foundation.org, Mel Gorman <mel@csn.ul.ie>,
	Nishanth Aravamudan <nacc@us.ibm.com>,
	andi@firstfloor.org, David Rientjes <rientjes@google.com>,
	Adam Litke <agl@us.ibm.com>, Andy Whitcroft <apw@canonical.com>,
	eric.whitney@hp.com
Subject: Re: [PATCH 3/4] hugetlb:  add private bit-field to kobject structure
Date: Wed, 29 Jul 2009 11:25:01 -0700	[thread overview]
Message-ID: <20090729182501.GA1699@suse.de> (raw)
In-Reply-To: <20090729181158.23716.41437.sendpatchset@localhost.localdomain>

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-07-29 18:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 18:11 [PATCH 0/4] hugetlb: V1 Per Node Hugepages attributes Lee Schermerhorn
2009-07-29 18:11 ` [PATCH 1/4] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn
2009-07-29 18:11 ` [PATCH 2/4] hugetlb: numafy several functions Lee Schermerhorn
2009-07-29 18:11 ` [PATCH 3/4] hugetlb: add private bit-field to kobject structure Lee Schermerhorn
2009-07-29 18:25   ` Greg KH [this message]
2009-07-31 18:59     ` Lee Schermerhorn
2009-07-29 18:12 ` [PATCH 4/4] hugetlb: add per node hstate attributes Lee Schermerhorn
2009-07-30 19:39   ` David Rientjes
2009-07-31 10:36     ` Mel Gorman
2009-07-31 19:10       ` Lee Schermerhorn
2009-08-14 22:38         ` David Rientjes
2009-08-14 23:08           ` Andrew Morton
2009-08-14 23:19             ` Greg KH
2009-08-14 23:53             ` David Rientjes
2009-08-17  1:10               ` Lee Schermerhorn
2009-08-17 10:07                 ` David Rientjes
2009-08-15 10:08           ` Mel Gorman
2009-07-31 19:55       ` David Rientjes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090729182501.GA1699@suse.de \
    --to=gregkh@suse.de \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=apw@canonical.com \
    --cc=eric.whitney@hp.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-numa@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=nacc@us.ibm.com \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).