mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH 1/6] f2fs: optimize get node page readahead part
Date: Mon, 04 Feb 2013 10:38:36 +0900	[thread overview]
Message-ID: <1359941916.26950.12.camel@kjgkr> (raw)
In-Reply-To: <1359816711-16252-1-git-send-email-linkinjeon@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

Hi,

2013-02-02 (토), 23:51 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@samsung.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@samsung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-02-04  1:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 14:51 Namjae Jeon
2013-02-04  1:38 ` Jaegeuk Kim [this message]
2013-02-04  2:06   ` Namjae Jeon

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=1359941916.26950.12.camel@kjgkr \
    --to=jaegeuk.kim@samsung.com \
    --cc=a.sahrawat@samsung.com \
    --cc=linkinjeon@gmail.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®