2005-09-28 17:22:30

by Rohit Seth

[permalink] [raw]
Subject: [PATCH]: show_free_area shows free pages in pcp list



[PATCH]: The count field in pcp list represents the free pages in that list. Change the "used" to "free" in the print message in show_free_area routine.

Signed-off-by: Rohit Seth <[email protected]>


--- linux-2.6.14-rc2-mm1.org/mm/page_alloc.c 2005-09-27 10:03:51.000000000 -0700
+++ linux-2.6.14-rc2-mm1/mm/page_alloc.c 2005-09-28 09:09:21.000000000 -0700
@@ -1409,7 +1409,7 @@
pageset = zone_pcp(zone, cpu);

for (temperature = 0; temperature < 2; temperature++)
- printk("cpu %d %s: low %d, high %d, batch %d used:%d\n",
+ printk("cpu %d %s: low %d, high %d, batch %d free:%d\n",
cpu,
temperature ? "cold" : "hot",
pageset->pcp[temperature].low,


2005-09-28 17:40:38

by Christoph Lameter

[permalink] [raw]
Subject: Re: [PATCH]: show_free_area shows free pages in pcp list

On Wed, 28 Sep 2005, Seth, Rohit wrote:

> [PATCH]: The count field in pcp list represents the free pages in that list.

Well, lets keep it the way it is.

Its the number of free pages used by the pcp list.

Its true that these are pages that are not "used" by the system but they
are in use for the cache and not accounted for by the number of free
pages.


2005-09-28 18:10:35

by Rohit Seth

[permalink] [raw]
Subject: Re: [PATCH]: show_free_area shows free pages in pcp list

On Wed, 2005-09-28 at 10:40 -0700, Christoph Lameter wrote:
> On Wed, 28 Sep 2005, Seth, Rohit wrote:
>
> > [PATCH]: The count field in pcp list represents the free pages in that list.
>
> Well, lets keep it the way it is.
>
> Its the number of free pages used by the pcp list.
>

As you said, pcp is a cache of free pages. From pcp's point-of-view,
this is a count of free pages that is available for use.

> Its true that these are pages that are not "used" by the system but they
> are in use for the cache and not accounted for by the number of free
> pages.
>
>


In case free is causing any confusion then I would like to get that
changed to "count"...representing the number of elements on it (and the
field of structure just like other values).

2005-09-28 18:36:46

by Christoph Lameter

[permalink] [raw]
Subject: Re: [PATCH]: show_free_area shows free pages in pcp list

On Wed, 28 Sep 2005, Rohit Seth wrote:

> > Its the number of free pages used by the pcp list.
> As you said, pcp is a cache of free pages. From pcp's point-of-view,
> this is a count of free pages that is available for use.

This is the number of free pages on the list. Its the number of free
pages "used" by the list and no longer accounted for by the zone
free_pages count.

2005-09-28 20:30:05

by Rohit Seth

[permalink] [raw]
Subject: Re: [PATCH]: show_free_area shows free pages in pcp list

On Wed, 2005-09-28 at 11:36 -0700, Christoph Lameter wrote:
> On Wed, 28 Sep 2005, Rohit Seth wrote:
>
> > > Its the number of free pages used by the pcp list.
> > As you said, pcp is a cache of free pages. From pcp's point-of-view,
> > this is a count of free pages that is available for use.
>
> This is the number of free pages on the list. Its the number of free
> pages "used" by the list and no longer accounted for by the zone
> free_pages count.
>

As we are dumping the information so putting the field name "count"
itself makes more sense.

-rohit