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]
Message-id: <1359941916.26950.12.camel@kjgkr>
Date:	Mon, 04 Feb 2013 10:38:36 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	Namjae Jeon <namjae.jeon@...sung.com>,
	Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH 1/6] f2fs: optimize get node page readahead part

Hi,

2013-02-02 (토), 23:51 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@...sung.com>
> 
> We can remove the call to find_get_page to get a page from the cache
> and check for up-to-date, instead we can make use of grab_cache_page
> part itself to fetch the page from the cache.
> So, removing the call and moving the PageUptodate at proper place, also
> taken care of moving the lock_page condition in the page_hit part.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
> ---
>  fs/f2fs/node.c |   10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 33fa6d5..723185b 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -920,15 +920,12 @@ struct page *get_node_page_ra(struct page *parent, int start)
>  	if (!nid)
>  		return ERR_PTR(-ENOENT);
>  
> -	page = find_get_page(mapping, nid);
> -	if (page && PageUptodate(page))
> -		goto page_hit;
> -	f2fs_put_page(page, 0);
> -

The reason why we use this is to avoid the lock overhead.
This is a readahead flow, and we don't need to care about real
existence. Let's get and check the status of the page without any locks.
Thanks,

-- 
Jaegeuk Kim
Samsung

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ