All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kari Hurtta <hurtta+gmane@siilo.fmi.fi>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: Re: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim
Date: 06 Mar 2007 12:24:33 +0200	[thread overview]
Message-ID: <5d4poyvfdq.fsf@Hurtta06k.keh.iki.fi> (raw)
In-Reply-To: 45ED266E.7040107@linux.vnet.ibm.com

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 ?

/ Kari Hurtta


WARNING: multiple messages have this Message-ID (diff)
From: Kari Hurtta <hurtta+gmane@siilo.fmi.fi>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3][RFC] Containers: Pagecache controller reclaim
Date: 06 Mar 2007 12:24:33 +0200	[thread overview]
Message-ID: <5d4poyvfdq.fsf@Hurtta06k.keh.iki.fi> (raw)
In-Reply-To: 45ED266E.7040107@linux.vnet.ibm.com

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 ?

/ Kari Hurtta

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

  reply	other threads:[~2007-03-06 10:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  8:23 [PATCH 0/3][RFC] Containers: Pagecache accounting and control subsystem (v1) Vaidyanathan Srinivasan
2007-03-06  8:23 ` Vaidyanathan Srinivasan
2007-03-06  8:26 ` [PATCH 1/3][RFC] Containers: Pagecache controller setup Vaidyanathan Srinivasan
2007-03-06  8:26   ` Vaidyanathan Srinivasan
2007-03-06  8:28 ` [PATCH 2/3][RFC] Containers: Pagecache controller accounting Vaidyanathan Srinivasan
2007-03-06  8:28   ` Vaidyanathan Srinivasan
2007-03-06  8:29 ` [PATCH 3/3][RFC] Containers: Pagecache controller reclaim Vaidyanathan Srinivasan
2007-03-06  8:29   ` Vaidyanathan Srinivasan
2007-03-06 10:24   ` Kari Hurtta [this message]
2007-03-06 10:24     ` Kari Hurtta
2007-03-06 11:19     ` Vaidyanathan Srinivasan
2007-03-06 11:19       ` Vaidyanathan Srinivasan
2007-03-27  3:44   ` Aubrey Li
2007-03-27  3:44     ` Aubrey Li
2007-03-27  7:17     ` Vaidyanathan Srinivasan
2007-03-27  7:17       ` Vaidyanathan Srinivasan
2007-03-27  8:41       ` Aubrey Li
2007-03-27  8:41         ` Aubrey Li
2007-03-27  9:44         ` Vaidyanathan Srinivasan
2007-03-27  9:44           ` Vaidyanathan Srinivasan
2007-03-27 10:53           ` Aubrey Li
2007-03-27 10:53             ` Aubrey Li
2007-03-27 12:25             ` Vaidyanathan Srinivasan
2007-03-27 12:25               ` Vaidyanathan Srinivasan
  -- strict thread matches above, loose matches on Subject: below --
2007-03-05 14:52 [PATCH 0/3][RFC] Containers: Pagecache accounting and control subsystem (v1) Vaidyanathan Srinivasan
2007-03-05 14:52 ` [PATCH 3/3][RFC] Containers: Pagecache controller reclaim Vaidyanathan Srinivasan
2007-02-21 14:24 [PATCH 0/3][RFC] Containers: Pagecache accounting and control subsystem (v1) Vaidyanathan Srinivasan
2007-02-21 14:24 ` [PATCH 3/3][RFC] Containers: Pagecache controller reclaim Vaidyanathan Srinivasan

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=5d4poyvfdq.fsf@Hurtta06k.keh.iki.fi \
    --to=hurtta+gmane@siilo.fmi.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.