linux-fsdevel.vger.kernel.org archive mirror
 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/5] f2fs: change victim segmap test condition in get_victim_by_default
Date: Sun, 03 Mar 2013 13:17:37 +0900	[thread overview]
Message-ID: <1362284257.14386.1.camel@kjgkr> (raw)
In-Reply-To: <1362195637-20683-1-git-send-email-linkinjeon@gmail.com>

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

2013-03-02 (토), 12:40 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@samsung.com>
> 
> Instead of checking for victim_segmap(FG_GC) OR
> (gc_type == BG_GC) && victim_segmap(BG_GC);
> to continue for the victim selection. The 2 conditions
> can simply be merged and decision can directly be made using 'gc_type'.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
> ---
>  fs/f2fs/gc.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 94b8a0c..16b4148 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -266,10 +266,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
>  		}
>  		p.offset = ((segno / p.ofs_unit) * p.ofs_unit) + p.ofs_unit;
>  
> -		if (test_bit(segno, dirty_i->victim_segmap[FG_GC]))
> -			continue;
> -		if (gc_type == BG_GC &&
> -				test_bit(segno, dirty_i->victim_segmap[BG_GC]))
> +		if (test_bit(segno, dirty_i->victim_segmap[gc_type]))

Negative.
We should check FG_GC all the time.
Thanks,

>  			continue;
>  		if (IS_CURSEC(sbi, GET_SECNO(sbi, segno)))
>  			continue;

-- 
Jaegeuk Kim
Samsung

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

      reply	other threads:[~2013-03-03  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02  3:40 [PATCH 1/5] f2fs: change victim segmap test condition in get_victim_by_default Namjae Jeon
2013-03-03  4:17 ` Jaegeuk Kim [this message]

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=1362284257.14386.1.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;
as well as URLs for NNTP newsgroup(s).