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

2013-11-24 Thread Chao Yu
Hi,

> -Original Message-
> From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
> Sent: Sunday, November 24, 2013 12:26 PM
> To: Chao Yu
> Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
> linux-f2fs-de...@lists.sourceforge.net; 谭姝
> Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages 
> by merging for mount performance
> 
> Hi,
> 
> 2013-11-22 (금), 09:09 +0800, Chao Yu:
> > 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.
> >
> > change log:
> >  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
> >suggested.
> >  o add mark_page_accessed() before release page to delay VM reclaiming.
> >  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
> >
> > Signed-off-by: Chao Yu 
> > ---
> >  fs/f2fs/segment.c |  103 
> > +++--
> >  fs/f2fs/segment.h |2 ++
> >  2 files changed, 78 insertions(+), 27 deletions(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 8149eba..998e7d3 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -14,6 +14,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include "f2fs.h"
> >  #include "segment.h"
> > @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
> > return restore_curseg_summaries(sbi);
> >  }
> >
> > +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
> > +{
> > +   struct address_space *mapping = sbi->meta_inode->i_mapping;
> > +   struct page *page;
> > +   block_t blk_addr, prev_blk_addr = 0;
> > +   int sit_blk_cnt = SIT_BLK_CNT(sbi);
> > +   int blkno = start;
> > +
> > +   for (; blkno < start + nrpages && blkno < sit_blk_cnt; blkno++) {
> > +
> > +   blk_addr = current_sit_addr(sbi, start * SIT_ENTRY_PER_BLOCK);
> 
> Should be:
>   blk_addr = current_sit_addr(sbi, blkno * SIT_ENTRY_PER_BLOCK);
>   ---
> I'll fix this and merge the patch though.
> Thanks,

Oh, It's my mistake, sorry for that.
Thanks for your review! :)

> 
> --
> Jaegeuk Kim
> Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-24 Thread Chao Yu
Hi,

 -Original Message-
 From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
 Sent: Sunday, November 24, 2013 12:26 PM
 To: Chao Yu
 Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
 linux-f2fs-de...@lists.sourceforge.net; 谭姝
 Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages 
 by merging for mount performance
 
 Hi,
 
 2013-11-22 (금), 09:09 +0800, Chao Yu:
  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.
 
  change log:
   o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
 suggested.
   o add mark_page_accessed() before release page to delay VM reclaiming.
   o remove '*order' for simplification of function as Jaegeuk Kim suggested.
 
  Signed-off-by: Chao Yu chao2...@samsung.com
  ---
   fs/f2fs/segment.c |  103 
  +++--
   fs/f2fs/segment.h |2 ++
   2 files changed, 78 insertions(+), 27 deletions(-)
 
  diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
  index 8149eba..998e7d3 100644
  --- a/fs/f2fs/segment.c
  +++ b/fs/f2fs/segment.c
  @@ -14,6 +14,7 @@
   #include linux/blkdev.h
   #include linux/prefetch.h
   #include linux/vmalloc.h
  +#include linux/swap.h
 
   #include f2fs.h
   #include segment.h
  @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
  return restore_curseg_summaries(sbi);
   }
 
  +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
  +{
  +   struct address_space *mapping = sbi-meta_inode-i_mapping;
  +   struct page *page;
  +   block_t blk_addr, prev_blk_addr = 0;
  +   int sit_blk_cnt = SIT_BLK_CNT(sbi);
  +   int blkno = start;
  +
  +   for (; blkno  start + nrpages  blkno  sit_blk_cnt; blkno++) {
  +
  +   blk_addr = current_sit_addr(sbi, start * SIT_ENTRY_PER_BLOCK);
 
 Should be:
   blk_addr = current_sit_addr(sbi, blkno * SIT_ENTRY_PER_BLOCK);
   ---
 I'll fix this and merge the patch though.
 Thanks,

Oh, It's my mistake, sorry for that.
Thanks for your review! :)

 
 --
 Jaegeuk Kim
 Samsung

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-23 Thread Jaegeuk Kim
Hi,

2013-11-22 (금), 09:09 +0800, Chao Yu:
> 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.
> 
> change log:
>  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng 
>suggested.
>  o add mark_page_accessed() before release page to delay VM reclaiming.
>  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
> 
> Signed-off-by: Chao Yu 
> ---
>  fs/f2fs/segment.c |  103 
> +++--
>  fs/f2fs/segment.h |2 ++
>  2 files changed, 78 insertions(+), 27 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 8149eba..998e7d3 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -14,6 +14,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "f2fs.h"
>  #include "segment.h"
> @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
>   return restore_curseg_summaries(sbi);
>  }
>  
> +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
> +{
> + struct address_space *mapping = sbi->meta_inode->i_mapping;
> + struct page *page;
> + block_t blk_addr, prev_blk_addr = 0;
> + int sit_blk_cnt = SIT_BLK_CNT(sbi);
> + int blkno = start;
> +
> + for (; blkno < start + nrpages && blkno < sit_blk_cnt; blkno++) {
> +
> + blk_addr = current_sit_addr(sbi, start * SIT_ENTRY_PER_BLOCK);

Should be:
blk_addr = current_sit_addr(sbi, blkno * SIT_ENTRY_PER_BLOCK);
---
I'll fix this and merge the patch though.
Thanks,

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-23 Thread Jaegeuk Kim
Hi,

2013-11-23 (토), 10:53 +0800, Chao Yu:
> Hi,
> 
> > -Original Message-
> > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
> > Sent: Friday, November 22, 2013 5:11 PM
> > To: Chao Yu
> > Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
> > linux-f2fs-de...@lists.sourceforge.net; 谭姝
> > Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry 
> > pages by merging for mount performance
> > 
> > Hi,
> > 
> > Just one niptick.
> > 
> > 2013-11-22 (금), 09:09 +0800, Chao Yu:
> > > 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.
> > >
> > > change log:
> > >  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu 
> > > Zheng
> > >suggested.
> > >  o add mark_page_accessed() before release page to delay VM reclaiming.
> > >  o remove '*order' for simplification of function as Jaegeuk Kim 
> > > suggested.
> > >
> > > Signed-off-by: Chao Yu 
> > > ---
> > >  fs/f2fs/segment.c |  103 
> > > +++--
> > >  fs/f2fs/segment.h |2 ++
> > >  2 files changed, 78 insertions(+), 27 deletions(-)
> > >
> > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > > index 8149eba..998e7d3 100644
> > > --- a/fs/f2fs/segment.c
> > > +++ b/fs/f2fs/segment.c
> > > @@ -14,6 +14,7 @@
> > >  #include 
> > >  #include 
> > >  #include 
> > > +#include 
> > >
> > >  #include "f2fs.h"
> > >  #include "segment.h"
> > > @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
> > >   return restore_curseg_summaries(sbi);
> > >  }
> > >
> > > +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
> > > +{
> > > + struct address_space *mapping = sbi->meta_inode->i_mapping;
> > > + struct page *page;
> > > + block_t blk_addr, prev_blk_addr = 0;
> > > + int sit_blk_cnt = SIT_BLK_CNT(sbi);
> > 
> > Can we remove SIT_BLK_CNT by replacing with sit_i->sit_blocks?
> 
> Because sit_i->sit_blocks is a multiple of segment size(i.e. 512/1024),
> but we may use part of sit_blocks, not all of them. So it's waste to read 
> all of them.
> What's your opinion?

Got it.
It's right and we can avoid that.
Thanks, :)

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-23 Thread Jaegeuk Kim
Hi,

2013-11-23 (토), 10:53 +0800, Chao Yu:
 Hi,
 
  -Original Message-
  From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
  Sent: Friday, November 22, 2013 5:11 PM
  To: Chao Yu
  Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
  linux-f2fs-de...@lists.sourceforge.net; 谭姝
  Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry 
  pages by merging for mount performance
  
  Hi,
  
  Just one niptick.
  
  2013-11-22 (금), 09:09 +0800, Chao Yu:
   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.
  
   change log:
o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu 
   Zheng
  suggested.
o add mark_page_accessed() before release page to delay VM reclaiming.
o remove '*order' for simplification of function as Jaegeuk Kim 
   suggested.
  
   Signed-off-by: Chao Yu chao2...@samsung.com
   ---
fs/f2fs/segment.c |  103 
   +++--
fs/f2fs/segment.h |2 ++
2 files changed, 78 insertions(+), 27 deletions(-)
  
   diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
   index 8149eba..998e7d3 100644
   --- a/fs/f2fs/segment.c
   +++ b/fs/f2fs/segment.c
   @@ -14,6 +14,7 @@
#include linux/blkdev.h
#include linux/prefetch.h
#include linux/vmalloc.h
   +#include linux/swap.h
  
#include f2fs.h
#include segment.h
   @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
 return restore_curseg_summaries(sbi);
}
  
   +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
   +{
   + struct address_space *mapping = sbi-meta_inode-i_mapping;
   + struct page *page;
   + block_t blk_addr, prev_blk_addr = 0;
   + int sit_blk_cnt = SIT_BLK_CNT(sbi);
  
  Can we remove SIT_BLK_CNT by replacing with sit_i-sit_blocks?
 
 Because sit_i-sit_blocks is a multiple of segment size(i.e. 512/1024),
 but we may use part of sit_blocks, not all of them. So it's waste to read 
 all of them.
 What's your opinion?

Got it.
It's right and we can avoid that.
Thanks, :)

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-23 Thread Jaegeuk Kim
Hi,

2013-11-22 (금), 09:09 +0800, Chao Yu:
 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.
 
 change log:
  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng 
suggested.
  o add mark_page_accessed() before release page to delay VM reclaiming.
  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
 
 Signed-off-by: Chao Yu chao2...@samsung.com
 ---
  fs/f2fs/segment.c |  103 
 +++--
  fs/f2fs/segment.h |2 ++
  2 files changed, 78 insertions(+), 27 deletions(-)
 
 diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
 index 8149eba..998e7d3 100644
 --- a/fs/f2fs/segment.c
 +++ b/fs/f2fs/segment.c
 @@ -14,6 +14,7 @@
  #include linux/blkdev.h
  #include linux/prefetch.h
  #include linux/vmalloc.h
 +#include linux/swap.h
  
  #include f2fs.h
  #include segment.h
 @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
   return restore_curseg_summaries(sbi);
  }
  
 +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
 +{
 + struct address_space *mapping = sbi-meta_inode-i_mapping;
 + struct page *page;
 + block_t blk_addr, prev_blk_addr = 0;
 + int sit_blk_cnt = SIT_BLK_CNT(sbi);
 + int blkno = start;
 +
 + for (; blkno  start + nrpages  blkno  sit_blk_cnt; blkno++) {
 +
 + blk_addr = current_sit_addr(sbi, start * SIT_ENTRY_PER_BLOCK);

Should be:
blk_addr = current_sit_addr(sbi, blkno * SIT_ENTRY_PER_BLOCK);
---
I'll fix this and merge the patch though.
Thanks,

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-22 Thread Chao Yu
Hi,

> -Original Message-
> From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
> Sent: Friday, November 22, 2013 5:11 PM
> To: Chao Yu
> Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
> linux-f2fs-de...@lists.sourceforge.net; 谭姝
> Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages 
> by merging for mount performance
> 
> Hi,
> 
> Just one niptick.
> 
> 2013-11-22 (금), 09:09 +0800, Chao Yu:
> > 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.
> >
> > change log:
> >  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
> >suggested.
> >  o add mark_page_accessed() before release page to delay VM reclaiming.
> >  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
> >
> > Signed-off-by: Chao Yu 
> > ---
> >  fs/f2fs/segment.c |  103 
> > +++--
> >  fs/f2fs/segment.h |2 ++
> >  2 files changed, 78 insertions(+), 27 deletions(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 8149eba..998e7d3 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -14,6 +14,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include "f2fs.h"
> >  #include "segment.h"
> > @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
> > return restore_curseg_summaries(sbi);
> >  }
> >
> > +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
> > +{
> > +   struct address_space *mapping = sbi->meta_inode->i_mapping;
> > +   struct page *page;
> > +   block_t blk_addr, prev_blk_addr = 0;
> > +   int sit_blk_cnt = SIT_BLK_CNT(sbi);
> 
> Can we remove SIT_BLK_CNT by replacing with sit_i->sit_blocks?

Because sit_i->sit_blocks is a multiple of segment size(i.e. 512/1024),
but we may use part of sit_blocks, not all of them. So it's waste to read 
all of them.
What's your opinion?

Regards,
Yu

> 
> --
> Jaegeuk Kim
> Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-22 Thread Jaegeuk Kim
Hi,

Just one niptick.

2013-11-22 (금), 09:09 +0800, Chao Yu:
> 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.
> 
> change log:
>  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng 
>suggested.
>  o add mark_page_accessed() before release page to delay VM reclaiming.
>  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
> 
> Signed-off-by: Chao Yu 
> ---
>  fs/f2fs/segment.c |  103 
> +++--
>  fs/f2fs/segment.h |2 ++
>  2 files changed, 78 insertions(+), 27 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index 8149eba..998e7d3 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -14,6 +14,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "f2fs.h"
>  #include "segment.h"
> @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
>   return restore_curseg_summaries(sbi);
>  }
>  
> +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
> +{
> + struct address_space *mapping = sbi->meta_inode->i_mapping;
> + struct page *page;
> + block_t blk_addr, prev_blk_addr = 0;
> + int sit_blk_cnt = SIT_BLK_CNT(sbi);

Can we remove SIT_BLK_CNT by replacing with sit_i->sit_blocks?

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-22 Thread Jaegeuk Kim
Hi,

Just one niptick.

2013-11-22 (금), 09:09 +0800, Chao Yu:
 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.
 
 change log:
  o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng 
suggested.
  o add mark_page_accessed() before release page to delay VM reclaiming.
  o remove '*order' for simplification of function as Jaegeuk Kim suggested.
 
 Signed-off-by: Chao Yu chao2...@samsung.com
 ---
  fs/f2fs/segment.c |  103 
 +++--
  fs/f2fs/segment.h |2 ++
  2 files changed, 78 insertions(+), 27 deletions(-)
 
 diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
 index 8149eba..998e7d3 100644
 --- a/fs/f2fs/segment.c
 +++ b/fs/f2fs/segment.c
 @@ -14,6 +14,7 @@
  #include linux/blkdev.h
  #include linux/prefetch.h
  #include linux/vmalloc.h
 +#include linux/swap.h
  
  #include f2fs.h
  #include segment.h
 @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
   return restore_curseg_summaries(sbi);
  }
  
 +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
 +{
 + struct address_space *mapping = sbi-meta_inode-i_mapping;
 + struct page *page;
 + block_t blk_addr, prev_blk_addr = 0;
 + int sit_blk_cnt = SIT_BLK_CNT(sbi);

Can we remove SIT_BLK_CNT by replacing with sit_i-sit_blocks?

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2013-11-22 Thread Chao Yu
Hi,

 -Original Message-
 From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
 Sent: Friday, November 22, 2013 5:11 PM
 To: Chao Yu
 Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
 linux-f2fs-de...@lists.sourceforge.net; 谭姝
 Subject: Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages 
 by merging for mount performance
 
 Hi,
 
 Just one niptick.
 
 2013-11-22 (금), 09:09 +0800, Chao Yu:
  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.
 
  change log:
   o merge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng
 suggested.
   o add mark_page_accessed() before release page to delay VM reclaiming.
   o remove '*order' for simplification of function as Jaegeuk Kim suggested.
 
  Signed-off-by: Chao Yu chao2...@samsung.com
  ---
   fs/f2fs/segment.c |  103 
  +++--
   fs/f2fs/segment.h |2 ++
   2 files changed, 78 insertions(+), 27 deletions(-)
 
  diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
  index 8149eba..998e7d3 100644
  --- a/fs/f2fs/segment.c
  +++ b/fs/f2fs/segment.c
  @@ -14,6 +14,7 @@
   #include linux/blkdev.h
   #include linux/prefetch.h
   #include linux/vmalloc.h
  +#include linux/swap.h
 
   #include f2fs.h
   #include segment.h
  @@ -1488,41 +1489,89 @@ static int build_curseg(struct f2fs_sb_info *sbi)
  return restore_curseg_summaries(sbi);
   }
 
  +static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages)
  +{
  +   struct address_space *mapping = sbi-meta_inode-i_mapping;
  +   struct page *page;
  +   block_t blk_addr, prev_blk_addr = 0;
  +   int sit_blk_cnt = SIT_BLK_CNT(sbi);
 
 Can we remove SIT_BLK_CNT by replacing with sit_i-sit_blocks?

Because sit_i-sit_blocks is a multiple of segment size(i.e. 512/1024),
but we may use part of sit_blocks, not all of them. So it's waste to read 
all of them.
What's your opinion?

Regards,
Yu

 
 --
 Jaegeuk Kim
 Samsung

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/