lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ