[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080630112831.66b939ba.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 30 Jun 2008 11:28:31 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Balbir Singh <balbir@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memcg: shmem_getpage release page sooner
On Sun, 29 Jun 2008 01:14:30 +0100 (BST)
Hugh Dickins <hugh@...itas.com> wrote:
> No big deal, but since mem_cgroup_shrink_usage doesn't require a page to
> operate upon, page_cache_release the swappage before calling it, so it's
> not pinned across the reclaim.
>
> Signed-off-by: Hugh Dickins <hugh@...itas.com>
this one is better, thanks.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> ---
> Should follow mmotm's memcg-helper-function-for-relcaim-from-shmem.patch
>
> mm/shmem.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> --- mmotm/mm/shmem.c 2008-06-27 13:39:20.000000000 +0100
> +++ linux/mm/shmem.c 2008-06-27 17:25:41.000000000 +0100
> @@ -1315,16 +1315,14 @@ repeat:
> shmem_swp_unmap(entry);
> spin_unlock(&info->lock);
> unlock_page(swappage);
> + page_cache_release(swappage);
> if (error == -ENOMEM) {
> /* allow reclaim from this memory cgroup */
> error = mem_cgroup_shrink_usage(current->mm,
> - gfp & ~__GFP_HIGHMEM);
> - if (error) {
> - page_cache_release(swappage);
> + gfp);
> + if (error)
> goto failed;
> - }
> }
> - page_cache_release(swappage);
> goto repeat;
> }
> } else if (sgp == SGP_READ && !filepage) {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists