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:	Thu, 31 Jan 2013 10:03:52 +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/3] f2fs: avoid redundant call to has_not_enough_free_secs
 in f2fs_gc

2013-01-30 (수), 22:47 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@...sung.com>
> 
> After doing a write_checkpoint from garbage collection path if there is still
> need to do more garbage collection, gc_more label is used to jump and start
> the process again. And in that process, first step before getting victim is to
> check if there are not enough free sections, which is already done before
> doing a jump to gc_more. We can avoid the redundant call to check free
> sections, by checking the gc_type flag which will remain FG_GC(value 1) under
> this condition.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com>
> Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
> ---
>  fs/f2fs/gc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index 9b5d0aa..0dfdaa5 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -672,7 +672,7 @@ gc_more:
>  	if (!(sbi->sb->s_flags & MS_ACTIVE))
>  		goto stop;
>  
> -	if (has_not_enough_free_secs(sbi))
> +	if (!gc_type && has_not_enough_free_secs(sbi))

I applied this patch with the following change:
	if (gc_type == BG_GC && has_not_enough_free_secs(sbi))

Thank you. :)

>  		gc_type = FG_GC;
>  
>  	if (!__get_victim(sbi, &segno, gc_type, NO_CHECK_TYPE))

-- 
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