2013-07-25 23:38:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] drivers: base: new memory config sysfs driver for large memory systems

On Thu, Jul 25, 2013 at 04:11:20PM -0500, Seth Jennings wrote:
> From: Nathan Fontenot <[email protected]>
>
> Large memory systems (1TB or more) experience boot delays on the order
> of minutes due to the initializing the memory configuration part of
> sysfs at /sys/devices/system/memory/.
>
> ppc64 has a memory block size of 256M and (I think) x86 is 128M. With 1TB
> of RAM and a 256M block size, that's 4k memory blocks with 20 sysfs
> entries per block that's around 80k items that need be created at boot
> time in sysfs. Some systems go up to 16TB where the issue is
> even more severe.
>
> This patch is a prototype for a new sysfs memory layout where the
> entries are created on demand by writing memory block numbers into a
> "show" and "hide" files to create and destroy the memory block
> configuration attributes in sysfs. This would decouple the number of
> sysfs entries created at boot time from the memory size, resulting in a
> sysfs initialization time that doesn't increase and memory size
> increase.
>
> Signed-off-by: Seth Jennings <[email protected]>
> Signed-off-by: Nathan Fontenot <[email protected]>

How does this tie into the patches Nathan sent yesterday for memory
hotplug stuff that I thought modified the same part of the kernel?

thanks,

greg k-h


2013-07-30 15:24:48

by Seth Jennings

[permalink] [raw]
Subject: Re: [PATCH] drivers: base: new memory config sysfs driver for large memory systems

On Thu, Jul 25, 2013 at 04:38:00PM -0700, Greg Kroah-Hartman wrote:
> On Thu, Jul 25, 2013 at 04:11:20PM -0500, Seth Jennings wrote:
> > From: Nathan Fontenot <[email protected]>
> >
> > Large memory systems (1TB or more) experience boot delays on the order
> > of minutes due to the initializing the memory configuration part of
> > sysfs at /sys/devices/system/memory/.
> >
> > ppc64 has a memory block size of 256M and (I think) x86 is 128M. With 1TB
> > of RAM and a 256M block size, that's 4k memory blocks with 20 sysfs
> > entries per block that's around 80k items that need be created at boot
> > time in sysfs. Some systems go up to 16TB where the issue is
> > even more severe.
> >
> > This patch is a prototype for a new sysfs memory layout where the
> > entries are created on demand by writing memory block numbers into a
> > "show" and "hide" files to create and destroy the memory block
> > configuration attributes in sysfs. This would decouple the number of
> > sysfs entries created at boot time from the memory size, resulting in a
> > sysfs initialization time that doesn't increase and memory size
> > increase.
> >
> > Signed-off-by: Seth Jennings <[email protected]>
> > Signed-off-by: Nathan Fontenot <[email protected]>
>
> How does this tie into the patches Nathan sent yesterday for memory
> hotplug stuff that I thought modified the same part of the kernel?

So this patch introduces the new layout in a new file
drives/base/memfs.c (which, in light of your last comment should
probably be something more like largememory.c).

It doesn't clash with Nathan's, but it doesn't contain the new
is_memblock_[removable|offline] functions or the new "release"
attribute. But that can be added easily.

Seth

2013-08-01 20:56:44

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] drivers: base: new memory config sysfs driver for large memory systems

On Fri, Jul 26, 2013 at 09:33:44AM -0500, Seth Jennings wrote:
> On Thu, Jul 25, 2013 at 04:38:00PM -0700, Greg Kroah-Hartman wrote:
> > On Thu, Jul 25, 2013 at 04:11:20PM -0500, Seth Jennings wrote:
> > > From: Nathan Fontenot <[email protected]>
> > >
> > > Large memory systems (1TB or more) experience boot delays on the order
> > > of minutes due to the initializing the memory configuration part of
> > > sysfs at /sys/devices/system/memory/.
> > >
> > > ppc64 has a memory block size of 256M and (I think) x86 is 128M. With 1TB
> > > of RAM and a 256M block size, that's 4k memory blocks with 20 sysfs
> > > entries per block that's around 80k items that need be created at boot
> > > time in sysfs. Some systems go up to 16TB where the issue is
> > > even more severe.
> > >
> > > This patch is a prototype for a new sysfs memory layout where the
> > > entries are created on demand by writing memory block numbers into a
> > > "show" and "hide" files to create and destroy the memory block
> > > configuration attributes in sysfs. This would decouple the number of
> > > sysfs entries created at boot time from the memory size, resulting in a
> > > sysfs initialization time that doesn't increase and memory size
> > > increase.
> > >
> > > Signed-off-by: Seth Jennings <[email protected]>
> > > Signed-off-by: Nathan Fontenot <[email protected]>
> >
> > How does this tie into the patches Nathan sent yesterday for memory
> > hotplug stuff that I thought modified the same part of the kernel?
>
> So this patch introduces the new layout in a new file
> drives/base/memfs.c (which, in light of your last comment should
> probably be something more like largememory.c).
>
> It doesn't clash with Nathan's, but it doesn't contain the new
> is_memblock_[removable|offline] functions or the new "release"
> attribute. But that can be added easily.

Can you two please work together on this so I we don't have to deal with
competing patch sets and get confused as to what is really going on
here?

thanks,

greg k-h