From: Greg KH <gregkh@suse.de>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nathan Fontenot <nfont@austin.ibm.com>,
Dave Hansen <dave@linux.vnet.ibm.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH] memory hotplug disable boot option
Date: Thu, 1 Jul 2010 16:28:42 -0700 [thread overview]
Message-ID: <20100701232842.GE13617@suse.de> (raw)
In-Reply-To: <20100701123057.9e5b7881.kamezawa.hiroyu@jp.fujitsu.com>
On Thu, Jul 01, 2010 at 12:30:57PM +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 30 Jun 2010 22:17:35 -0500
> Nathan Fontenot <nfont@austin.ibm.com> wrote:
>
> > On 06/30/2010 07:31 PM, KAMEZAWA Hiroyuki wrote:
> > > On Wed, 30 Jun 2010 08:47:55 -0700
> > > Greg KH <gregkh@suse.de> wrote:
> > >>> and adding a scalable interface for large scale machines ?
> > >>> I'd like to consider something..
> > >>
> > >> Dynamically changing the layout on big memory boxes makes sense to me,
> > >> how about you?
> > >>
> > >
> > > like this ?
> > > ==
> > > boot option:
> > > memory_sysfs_layout=compact
> > > memory_sysfs_layout=auto (default)
> > > memory_sysfs_layout=full
> > >
> > > Considering briefly, how about this compact layout ?
> > >
> > > /sys/devices/system/memory/:
> > > list, hide, show, memoryX...
> > >
> > > list: // show available memory index list.
> > > #cat list
> > > 0 1 2 ....10000...
> > >
> > > show: //an interface to enable the interface.
> > > #echo INDEX > memory_index
> > > will create memoryINDEX diretory.
> > >
> > > hide: //an interface to hide the interface.
> > > #echo INDEX > memory_hide
> > > will remove memoryINDEX sysfs directory.
> > >
> > >
> > > In compact mode, all memoryX interface are hidden at boot.
> > > In full mode, all memoryX interaface are shown.
> > > The Boot option just affects status at boot. If users want, he can make
> > > all memory sysfs in shown state.
> >
> > Do we need to make something as complicated as dynamically adding and removing
> > the sysfs directories? Why not a compact layout that just takes the files
> > that currently reside in the memoryXX dirs and move them up to the memory
> > directory. This would be state (which should probably be split into an
> > 'online' and 'offline' file), removable, phys_index, and phys_device.
> >
> I've considered several patterns.
>
> with 4096 bytes buffer of sysfs, "printting bitmap" just covers small
> amount of sections even with smart ASCII format to show contiguous range
> as a chunk. That's my concern. (and 'list' file in above example
> is impossible to impelement.)
Yes, that's my concern as well. sysfs is "one value per file" and if
you are worried about the size of the sysfs buffer, something is wrong
with your interface.
> If I can use rmdir/mkdir interface, it's much simple rather than above "echo".
> But it seems impossible.
That's what configfs is for :)
> Because we have memory information in /proc/iomem already, I think hide/show
> interface (instead of mkdir/rmdir) is not very bad.
>
> If you can implement highly scalable interface, please.
> I just stop dreaming and ack yours.
Why not just create your own filesystem for this, "memoryfs", where you
can do what you want and you don't have to worry about sysfs apis and
buffer sizes.
thanks,
greg k-h
next prev parent reply other threads:[~2010-07-01 23:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 1:06 [PATCH] memory hotplug disable boot option Nathan Fontenot
2010-06-25 2:04 ` KOSAKI Motohiro
2010-06-25 9:19 ` Andi Kleen
2010-06-25 14:51 ` Nathan Fontenot
2010-06-25 14:56 ` Andi Kleen
2010-06-25 15:21 ` Nathan Fontenot
2010-06-25 15:28 ` Andi Kleen
2010-06-25 16:00 ` Nathan Fontenot
2010-06-28 2:20 ` KOSAKI Motohiro
2010-06-28 4:15 ` Eric W. Biederman
2010-06-28 14:16 ` Andi Kleen
2010-06-28 19:43 ` Eric W. Biederman
2010-06-28 15:02 ` Greg KH
2010-06-28 15:37 ` Nathan Fontenot
2010-06-28 15:44 ` Greg KH
2010-06-29 0:04 ` Dave Hansen
2010-06-29 2:56 ` KOSAKI Motohiro
2010-06-29 15:38 ` Nathan Fontenot
2010-06-30 0:00 ` KOSAKI Motohiro
2010-06-29 16:03 ` Dave Hansen
2010-06-29 18:04 ` Greg KH
2010-06-30 0:32 ` KAMEZAWA Hiroyuki
2010-06-30 15:47 ` Greg KH
2010-07-01 0:31 ` KAMEZAWA Hiroyuki
2010-07-01 3:17 ` Nathan Fontenot
2010-07-01 3:30 ` KAMEZAWA Hiroyuki
2010-07-01 23:28 ` Greg KH [this message]
2010-07-01 5:15 ` KAMEZAWA Hiroyuki
2010-07-01 13:23 ` Dave Hansen
2010-07-06 15:20 ` Nathan Fontenot
2010-07-06 15:33 ` Dave Hansen
2010-07-06 15:47 ` Nathan Fontenot
2010-07-01 23:26 ` Greg KH
2010-07-02 5:50 ` KAMEZAWA Hiroyuki
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=20100701232842.GE13617@suse.de \
--to=gregkh@suse.de \
--cc=andi@firstfloor.org \
--cc=dave@linux.vnet.ibm.com \
--cc=ebiederm@xmission.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nfont@austin.ibm.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