From: Huang Ying <ying.huang@intel.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Changman Lee <cm224.lee@samsung.com> Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Huang Ying <ying.huang@intel.com> Subject: [PATCH -v2] f2fs: Remove lock from check_valid_map Date: Sun, 7 Sep 2014 11:38:30 +0800 [thread overview] Message-ID: <1410061110-31081-1-git-send-email-ying.huang@intel.com> (raw) In-Reply-To: <1410059104-9060-1-git-send-email-ying.huang@intel.com> Only one bit is read in check_valid_map, holding a lock to do that doesn't help anything except decreasing performance. Signed-off-by: Huang, Ying <ying.huang@intel.com> --- v2: Fixed a build warning. --- fs/f2fs/gc.c | 3 --- 1 file changed, 3 deletions(-) --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -378,14 +378,11 @@ static void put_gc_inode(struct list_hea static int check_valid_map(struct f2fs_sb_info *sbi, unsigned int segno, int offset) { - struct sit_info *sit_i = SIT_I(sbi); struct seg_entry *sentry; int ret; - mutex_lock(&sit_i->sentry_lock); sentry = get_seg_entry(sbi, segno); ret = f2fs_test_bit(offset, sentry->cur_valid_map); - mutex_unlock(&sit_i->sentry_lock); return ret; }
WARNING: multiple messages have this Message-ID (diff)
From: Huang Ying <ying.huang@intel.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Changman Lee <cm224.lee@samsung.com> Cc: Huang Ying <ying.huang@intel.com>, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH -v2] f2fs: Remove lock from check_valid_map Date: Sun, 7 Sep 2014 11:38:30 +0800 [thread overview] Message-ID: <1410061110-31081-1-git-send-email-ying.huang@intel.com> (raw) In-Reply-To: <1410059104-9060-1-git-send-email-ying.huang@intel.com> Only one bit is read in check_valid_map, holding a lock to do that doesn't help anything except decreasing performance. Signed-off-by: Huang, Ying <ying.huang@intel.com> --- v2: Fixed a build warning. --- fs/f2fs/gc.c | 3 --- 1 file changed, 3 deletions(-) --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -378,14 +378,11 @@ static void put_gc_inode(struct list_hea static int check_valid_map(struct f2fs_sb_info *sbi, unsigned int segno, int offset) { - struct sit_info *sit_i = SIT_I(sbi); struct seg_entry *sentry; int ret; - mutex_lock(&sit_i->sentry_lock); sentry = get_seg_entry(sbi, segno); ret = f2fs_test_bit(offset, sentry->cur_valid_map); - mutex_unlock(&sit_i->sentry_lock); return ret; } ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/
next prev parent reply other threads:[~2014-09-07 3:38 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-07 3:05 [PATCH] f2fs: Remove lock from check_valid_map Huang Ying 2014-09-07 3:05 ` Huang Ying 2014-09-07 3:38 ` Huang Ying [this message] 2014-09-07 3:38 ` [PATCH -v2] " Huang Ying 2014-09-08 3:50 ` Jaegeuk Kim 2014-09-08 3:50 ` Jaegeuk Kim [not found] ` <CAC=cRTOdvOp=zBT986SqGXC2+iRxGzSgKdFYzTQjbAamYsGVsg@mail.gmail.com> 2014-09-09 5:13 ` Jaegeuk Kim 2014-09-09 5:13 ` Jaegeuk Kim 2014-09-09 5:43 ` Huang Ying 2014-09-09 5:43 ` Huang Ying 2014-09-09 7:41 ` Jaegeuk Kim 2014-09-09 8:04 ` Huang Ying
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=1410061110-31081-1-git-send-email-ying.huang@intel.com \ --to=ying.huang@intel.com \ --cc=cm224.lee@samsung.com \ --cc=jaegeuk@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.