linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] Export memblock migrate type to /sysfs
@ 2007-10-24 16:37 Badari Pulavarty
  2007-10-25  0:35 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 5+ messages in thread
From: Badari Pulavarty @ 2007-10-24 16:37 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki, melgor, haveblue; +Cc: linux-mm

Hi,

Now that grouping of pages by mobility is in mainline, I would like 
to make use of it for selection memory blocks for hotplug memory remove.
Following set of patches exports memblock's migrate type to /sysfs. 
This would be useful for user-level agent for selecting memory blocks
to try to remove.

	[PATCH 1/2] Fix migratetype_names[] and make it available
	[PATCH 2/2] Add mem_type in /syfs to show memblock migrate type

Todo:

	Currently, we decide the memblock's migrate type looking at
first page of memblock. But on some architectures (x86_64), each
memblock can contain multiple groupings of pages by mobility. Is it
important to address ?

Here is the output:

./memory/memory0/mem_type: Movable
./memory/memory1/mem_type: Movable
./memory/memory2/mem_type: Reserve
./memory/memory3/mem_type: Unmovable
./memory/memory4/mem_type: Movable
./memory/memory5/mem_type: Movable
./memory/memory6/mem_type: Movable
./memory/memory7/mem_type: Movable
./memory/memory8/mem_type: Reclaimable
./memory/memory9/mem_type: Unmovable
./memory/memory10/mem_type: Reclaimable
./memory/memory11/mem_type: Reclaimable
./memory/memory12/mem_type: Movable
./memory/memory13/mem_type: Movable
./memory/memory14/mem_type: Reclaimable
./memory/memory15/mem_type: Movable
./memory/memory16/mem_type: Reclaimable
./memory/memory17/mem_type: Reclaimable
./memory/memory18/mem_type: Reclaimable
./memory/memory19/mem_type: Reclaimable
./memory/memory20/mem_type: Reclaimable
./memory/memory21/mem_type: Reclaimable
./memory/memory22/mem_type: Reclaimable
./memory/memory23/mem_type: Reclaimable
./memory/memory24/mem_type: Reclaimable
./memory/memory25/mem_type: Reclaimable
./memory/memory26/mem_type: Reclaimable
./memory/memory27/mem_type: Reclaimable
./memory/memory28/mem_type: Reclaimable
./memory/memory29/mem_type: Reclaimable
./memory/memory30/mem_type: Reclaimable
./memory/memory31/mem_type: Reclaimable
./memory/memory32/mem_type: Reclaimable
./memory/memory33/mem_type: Reclaimable
./memory/memory34/mem_type: Reclaimable
./memory/memory35/mem_type: Reclaimable
./memory/memory36/mem_type: Reclaimable
./memory/memory37/mem_type: Reclaimable
./memory/memory38/mem_type: Reclaimable
./memory/memory39/mem_type: Reclaimable
./memory/memory40/mem_type: Reclaimable
./memory/memory41/mem_type: Movable
./memory/memory42/mem_type: Movable
./memory/memory43/mem_type: Movable
./memory/memory44/mem_type: Movable
./memory/memory45/mem_type: Movable
./memory/memory46/mem_type: Movable
./memory/memory47/mem_type: Movable
./memory/memory48/mem_type: Movable
./memory/memory49/mem_type: Movable

Thanks,
Badari

--
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC][PATCH 0/2] Export memblock migrate type to /sysfs
  2007-10-24 16:37 [RFC][PATCH 0/2] Export memblock migrate type to /sysfs Badari Pulavarty
@ 2007-10-25  0:35 ` KAMEZAWA Hiroyuki
  2007-10-25  4:51   ` Badari
  0 siblings, 1 reply; 5+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-10-25  0:35 UTC (permalink / raw)
  To: Badari Pulavarty; +Cc: melgor, haveblue, linux-mm

On Wed, 24 Oct 2007 09:37:40 -0700
Badari Pulavarty <pbadari@us.ibm.com> wrote:

> Hi,
> 
> Now that grouping of pages by mobility is in mainline, I would like 
> to make use of it for selection memory blocks for hotplug memory remove.
> Following set of patches exports memblock's migrate type to /sysfs. 
> This would be useful for user-level agent for selecting memory blocks
> to try to remove.
> 
> 	[PATCH 1/2] Fix migratetype_names[] and make it available
> 	[PATCH 2/2] Add mem_type in /syfs to show memblock migrate type
> 
At first, I welcome this patch. Thanks :)
> Todo:
> 
> 	Currently, we decide the memblock's migrate type looking at
> first page of memblock. But on some architectures (x86_64), each
> memblock can contain multiple groupings of pages by mobility. Is it
> important to address ?

Hmm, that is a problem annoying me. There is 2 points.

1. In such arch, we'll have to use ZONE_MOVABLE for hot-removable.
2. But from view of showing information to users, more precice is better
   of course.

How about showing information as following ?
==
%cat ./memory/memory0/mem_type
 1 0 0 0 0
%
as 
 Reserved Unmovable Movable Reserve Isolate

==
This is not difficult and can show all information.

Thanks,
-Kame

--
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC][PATCH 0/2] Export memblock migrate type to /sysfs
  2007-10-25  0:35 ` KAMEZAWA Hiroyuki
@ 2007-10-25  4:51   ` Badari
  2007-10-25  7:21     ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 5+ messages in thread
From: Badari @ 2007-10-25  4:51 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: melgor, haveblue, linux-mm

KAMEZAWA Hiroyuki wrote:
> On Wed, 24 Oct 2007 09:37:40 -0700
> Badari Pulavarty <pbadari@us.ibm.com> wrote:
>
>   
>> Hi,
>>
>> Now that grouping of pages by mobility is in mainline, I would like 
>> to make use of it for selection memory blocks for hotplug memory remove.
>> Following set of patches exports memblock's migrate type to /sysfs. 
>> This would be useful for user-level agent for selecting memory blocks
>> to try to remove.
>>
>> 	[PATCH 1/2] Fix migratetype_names[] and make it available
>> 	[PATCH 2/2] Add mem_type in /syfs to show memblock migrate type
>>
>>     
> At first, I welcome this patch. Thanks :)
>   
>> Todo:
>>
>> 	Currently, we decide the memblock's migrate type looking at
>> first page of memblock. But on some architectures (x86_64), each
>> memblock can contain multiple groupings of pages by mobility. Is it
>> important to address ?
>>     
>
> Hmm, that is a problem annoying me. There is 2 points.
>
> 1. In such arch, we'll have to use ZONE_MOVABLE for hot-removable.
> 2. But from view of showing information to users, more precice is better
>    of course.
>
> How about showing information as following ?
> ==
> %cat ./memory/memory0/mem_type
>  1 0 0 0 0
> %
> as 
>  Reserved Unmovable Movable Reserve Isolate
>
>   
Personally, I have no problem. But its against the rules of /sysfs - 
"one value per file" rule :(
I would say, lets keep it simple for now and extend it if needed.

Thanks,
Badari

--
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC][PATCH 0/2] Export memblock migrate type to /sysfs
  2007-10-25  4:51   ` Badari
@ 2007-10-25  7:21     ` KAMEZAWA Hiroyuki
  2007-10-25 10:10       ` Mel Gorman
  0 siblings, 1 reply; 5+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-10-25  7:21 UTC (permalink / raw)
  To: Badari; +Cc: melgor, haveblue, linux-mm

On Wed, 24 Oct 2007 21:51:20 -0700
Badari <pbadari@us.ibm.com> wrote:
> > How about showing information as following ?
> > ==
> > %cat ./memory/memory0/mem_type
> >  1 0 0 0 0
> > %
> > as 
> >  Reserved Unmovable Movable Reserve Isolate
> >
> >   
> Personally, I have no problem. But its against the rules of /sysfs - 
> "one value per file" rule :(
> I would say, lets keep it simple for now and extend it if needed.
> 
Hmm, but misleading information is not good.

How about adding "Mixed" status for memory section which containes multiple
page types ? For memory hotplug, it's enough.

Thanks,
-Kame

--
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC][PATCH 0/2] Export memblock migrate type to /sysfs
  2007-10-25  7:21     ` KAMEZAWA Hiroyuki
@ 2007-10-25 10:10       ` Mel Gorman
  0 siblings, 0 replies; 5+ messages in thread
From: Mel Gorman @ 2007-10-25 10:10 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: Badari, melgor, haveblue, linux-mm

On (25/10/07 16:21), KAMEZAWA Hiroyuki didst pronounce:
> On Wed, 24 Oct 2007 21:51:20 -0700
> Badari <pbadari@us.ibm.com> wrote:
> > > How about showing information as following ?
> > > ==
> > > %cat ./memory/memory0/mem_type
> > >  1 0 0 0 0
> > > %
> > > as 
> > >  Reserved Unmovable Movable Reserve Isolate
> > >
> > >   
> > Personally, I have no problem. But its against the rules of /sysfs - 
> > "one value per file" rule :(
> > I would say, lets keep it simple for now and extend it if needed.
> > 
> Hmm, but misleading information is not good.
> 
> How about adding "Mixed" status for memory section which containes multiple
> page types ? For memory hotplug, it's enough.
> 

"Mixed" to me implies that the section doesn't contain exclusively pages
of that type. It never happens in ZONE_MOVABLE of course, but it can happen
elsewhere due to fragmentation. "Multiple" I'd be happy with. So if we saw
"Movable", it's movable blocks only in that section but "Multiple" means
that there are more than one pageblock type in that section.

At some time in the future, Movable-mixed would imply that this is a
Movable section but memory pressure forced non-movable pages in there.
Again, would never happen in ZONE_MOVABLE.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-25 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:37 [RFC][PATCH 0/2] Export memblock migrate type to /sysfs Badari Pulavarty
2007-10-25  0:35 ` KAMEZAWA Hiroyuki
2007-10-25  4:51   ` Badari
2007-10-25  7:21     ` KAMEZAWA Hiroyuki
2007-10-25 10:10       ` Mel Gorman

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).