lkml.org 
[lkml]   [2007]   [Mar]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 06 Mar 2007 16:49:28 +0530
FromVaidyanathan Srinivasan <>
SubjectRe: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim

Kari Hurtta wrote:
> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> writes
> in gmane.linux.kernel,gmane.linux.kernel.mm:
> 
>> --- linux-2.6.20.orig/mm/pagecache_acct.c
>> +++ linux-2.6.20/mm/pagecache_acct.c
>> @@ -29,6 +29,7 @@
>>  #include <linux/uaccess.h>
>>  #include <asm/div64.h>
>>  #include <linux/pagecache_acct.h>
>> +#include <linux/memcontrol.h>
>>
>>  /*
>>   * Convert unit from pages to kilobytes
>> @@ -337,12 +338,20 @@ int pagecache_acct_cont_overlimit(struct
>>  		return 0;
>>  }
>>
>> -extern unsigned long shrink_all_pagecache_memory(unsigned long nr_pages);
>> +extern unsigned long shrink_container_memory(unsigned int memory_type,
>> +				unsigned long nr_pages, void *container);
>>
>>  int pagecache_acct_shrink_used(unsigned long nr_pages)
>>  {
>>  	unsigned long ret = 0;
>>  	atomic_inc(&reclaim_count);
>> +
>> +	/* Don't call reclaim for each page above limit */
>> +	if (nr_pages > NR_PAGES_RECLAIM_THRESHOLD) {
>> +		ret += shrink_container_memory(
>> +				RECLAIM_PAGECACHE_MEMORY, nr_pages, NULL);
>> +	}
>> +
>>  	return 0;
>>  }
>>
> 
> 'ret' is not used ?

I have been setting watch points and tracing the value of ret.
Basically that is used while debugging.  I have not removed it since
this is an RFC post and we would go through many cleanups cycles.

I will remember to remove it in the next version or verify that the
compiler does remove 'ret' :)

--Vaidy

> / Kari Hurtta
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-06 12:23    [from the cache]
©2003-2008