Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-18 Thread Jaegeuk Kim
Hi, 2013-11-18 (월), 09:37 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Monday, November 18, 2013 8:29 AM > > To: Chao Yu > > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > > linux-f2fs-devel@lists.

[f2fs-dev] [PATCH 2/2] f2fs: use sbi->wr_mutex for write bios

2013-11-18 Thread Jaegeuk Kim
This patch removes an unnecessary semaphore (i.e., sbi->bio_sem). There is no reason to use the semaphore when f2fs submits read and write IOs. Instead, let's use a write mutex and cover the sbi->bio[] by the lock. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c| 4 fs/f2fs/f2fs.h|

[f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow

2013-11-18 Thread Jaegeuk Kim
This patch introduces PAGE_TYPE_OF_BIO() and cleans up do_submit_bio() with it. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 39 +-- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.

[f2fs-dev] [PATCH] f2fs: use mutex rather than the rw_sem

2013-11-18 Thread Gu Zheng
Use mutex rather than the rw_sem to protect bio related fields, because it's needless to take the read_sem in the read path. Signed-off-by: Gu Zheng --- fs/f2fs/data.c|4 fs/f2fs/f2fs.h|2 +- fs/f2fs/segment.c |8 fs/f2fs/super.c |2 +- 4 files changed, 6

Re: [f2fs-dev] [PATCH 2/2] f2fs: use sbi->wr_mutex for write bios

2013-11-18 Thread Gu Zheng
Hi Kim, On 11/18/2013 05:12 PM, Jaegeuk Kim wrote: > This patch removes an unnecessary semaphore (i.e., sbi->bio_sem). > There is no reason to use the semaphore when f2fs submits read and write IOs. > Instead, let's use a write mutex and cover the sbi->bio[] by the lock. My god, I just sent out a

Re: [f2fs-dev] [PATCH 2/2] f2fs: use sbi->wr_mutex for write bios

2013-11-18 Thread Jaegeuk Kim
Hi Gu, 2013-11-18 (월), 17:21 +0800, Gu Zheng: > Hi Kim, > On 11/18/2013 05:12 PM, Jaegeuk Kim wrote: > > > This patch removes an unnecessary semaphore (i.e., sbi->bio_sem). > > There is no reason to use the semaphore when f2fs submits read and write > > IOs. > > Instead, let's use a write mutex

Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-18 Thread Gu Zheng
On 11/18/2013 05:11 PM, Jaegeuk Kim wrote: > Hi, > > 2013-11-18 (월), 09:37 +0800, Chao Yu: >> Hi Kim, >> >>> -Original Message- >>> From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] >>> Sent: Monday, November 18, 2013 8:29 AM >>> To: Chao Yu >>> Cc: linux-fsde...@vger.kernel.org; linux-k

Re: [f2fs-dev] [PATCH V2 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-18 Thread Gu Zheng
Hi Yu, One more comment, please refer to inline. On 11/16/2013 02:15 PM, Chao Yu wrote: > Previously we read sit entries page one by one, this method lost the chance > of reading contiguous page together. > So we read pages as contiguous as possible for better mount performance. > > v1-->v2: >

Re: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow

2013-11-18 Thread Chao Yu
Hi > -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Monday, November 18, 2013 5:12 PM > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_

Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read

2013-11-18 Thread Chao Yu
Hi > -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Monday, November 18, 2013 5:11 PM > To: Chao Yu > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net; '谭姝' > Subject: RE: [f2fs-dev] [PATCH V2 1/2] f2

[f2fs-dev] [PATCH] f2fs: split sbi->write_mutex for DATA/NODE/META to avoid unnecessary race

2013-11-18 Thread Chao Yu
All DATA/NODE/META bio buffers in superblock is protected by 'sbi->write_mutex', but each bio buffer area is independent, So we should split write_mutex to three for DATA/NODE/META. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h|2 +- fs/f2fs/segment.c |8 fs/f2fs/super.c |

Re: [f2fs-dev] [PATCH] f2fs: split sbi->write_mutex for DATA/NODE/META to avoid unnecessary race

2013-11-18 Thread Jaegeuk Kim
Hi, 2013-11-19 (화), 09:43 +0800, Chao Yu: > All DATA/NODE/META bio buffers in superblock is protected by > 'sbi->write_mutex', but each bio buffer area is independent, So we > should split write_mutex to three for DATA/NODE/META. Agreed, one comment below though. Anyway I'll send v2. Thanks, :)

Re: [f2fs-dev] [PATCH] f2fs: split sbi->write_mutex for DATA/NODE/META to avoid unnecessary race

2013-11-18 Thread Jaegeuk Kim
Hi, I think we don't need to make two patches for this. How about this? >From 71c27f78e72d680edcd7b1c0917842343044653c Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 18 Nov 2013 17:16:17 +0900 Subject: [PATCH] f2fs: use sbi->write_mutex for write bios This patch removes an unnecessary se

Re: [f2fs-dev] [PATCH] f2fs: split sbi->write_mutex for DATA/NODE/META to avoid unnecessary race

2013-11-18 Thread Chao Yu
Hi > -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Tuesday, November 19, 2013 11:36 AM > To: Chao Yu > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH] f2fs: split s

Re: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow

2013-11-18 Thread Chao Yu
Hi > -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Monday, November 18, 2013 5:12 PM > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Subject: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit

Re: [f2fs-dev] [PATCH 1/2] f2fs: clean up the do_submit_bio flow

2013-11-18 Thread Jaegeuk Kim
Hi, 2013-11-19 (화), 13:25 +0800, Chao Yu: > Hi > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Monday, November 18, 2013 5:12 PM > > Cc: linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > > linux-f2fs-devel@lists.sourceforge.net > > S

[f2fs-dev] [PATCH 2/2] f2fs: introduce a bio array for per-page write bios

2013-11-18 Thread Jaegeuk Kim
The f2fs has three bio types, NODE, DATA, and META, and manages some data structures per each bio types. The codes are a little bit messy, thus, this patch introduces a bio array which groups individual data structures as follows. struct f2fs_bio_info { struct bio *bio;/*

[f2fs-dev] [PATCH 1/2] f2fs: disable the extent cache ops on high fragmented files

2013-11-18 Thread Jaegeuk Kim
The f2fs manages an extent cache to search a number of consecutive data blocks very quickly. However it conducts unnecessary cache operations if the file is highly fragmented with no valid extent cache. In such the case, we don't need to handle the extent cache, but just can disable the cache fac