Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
On 2016/5/11 10:32, Jaegeuk Kim wrote: > On Wed, May 11, 2016 at 10:22:05AM +0800, Chao Yu wrote: >> On 2016/5/11 5:41, Jaegeuk Kim wrote: >>> + >>> + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); >>> + >>> + for (; count > 0; dn->ofs_in_node++) { >>> + block_t blkaddr =

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
On 2016/5/11 10:32, Jaegeuk Kim wrote: > On Wed, May 11, 2016 at 10:22:05AM +0800, Chao Yu wrote: >> On 2016/5/11 5:41, Jaegeuk Kim wrote: >>> + >>> + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); >>> + >>> + for (; count > 0; dn->ofs_in_node++) { >>> + block_t blkaddr =

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Jaegeuk Kim
On Wed, May 11, 2016 at 10:22:05AM +0800, Chao Yu wrote: > On 2016/5/11 5:41, Jaegeuk Kim wrote: > > + > > + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); > > + > > + for (; count > 0; dn->ofs_in_node++) { > > + block_t blkaddr = > > +

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Jaegeuk Kim
On Wed, May 11, 2016 at 10:22:05AM +0800, Chao Yu wrote: > On 2016/5/11 5:41, Jaegeuk Kim wrote: > > + > > + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); > > + > > + for (; count > 0; dn->ofs_in_node++) { > > + block_t blkaddr = > > +

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
On 2016/5/11 5:41, Jaegeuk Kim wrote: > + > + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); > + > + for (; count > 0; dn->ofs_in_node++) { > + block_t blkaddr = > + datablock_addr(dn->node_page, dn->ofs_in_node); > + if (blkaddr ==

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
On 2016/5/11 5:41, Jaegeuk Kim wrote: > + > + f2fs_wait_on_page_writeback(dn->node_page, NODE, true); > + > + for (; count > 0; dn->ofs_in_node++) { > + block_t blkaddr = > + datablock_addr(dn->node_page, dn->ofs_in_node); > + if (blkaddr ==

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Jaegeuk Kim
> > valid_block_count = > > - sbi->total_valid_block_count + (block_t)count; > > + sbi->total_valid_block_count + (block_t)(*count); > > if (unlikely(valid_block_count > sbi->user_block_count)) { > > - spin_unlock(>stat_lock); > > - return false; > >

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Jaegeuk Kim
> > valid_block_count = > > - sbi->total_valid_block_count + (block_t)count; > > + sbi->total_valid_block_count + (block_t)(*count); > > if (unlikely(valid_block_count > sbi->user_block_count)) { > > - spin_unlock(>stat_lock); > > - return false; > >

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
Hi Jaegeuk, On 2016/5/10 7:00, Jaegeuk Kim wrote: > Hi Chao, > > On Mon, May 09, 2016 at 07:56:30PM +0800, Chao Yu wrote: >> This patch introduces reserve_new_blocks to make preallocation of multi >> blocks as in batch operation, so it can avoid lots of redundant >> operation, result in better

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-10 Thread Chao Yu
Hi Jaegeuk, On 2016/5/10 7:00, Jaegeuk Kim wrote: > Hi Chao, > > On Mon, May 09, 2016 at 07:56:30PM +0800, Chao Yu wrote: >> This patch introduces reserve_new_blocks to make preallocation of multi >> blocks as in batch operation, so it can avoid lots of redundant >> operation, result in better

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-09 Thread Jaegeuk Kim
Hi Chao, On Mon, May 09, 2016 at 07:56:30PM +0800, Chao Yu wrote: > This patch introduces reserve_new_blocks to make preallocation of multi > blocks as in batch operation, so it can avoid lots of redundant > operation, result in better performance. > > In virtual machine, with rotational device:

Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-09 Thread Jaegeuk Kim
Hi Chao, On Mon, May 09, 2016 at 07:56:30PM +0800, Chao Yu wrote: > This patch introduces reserve_new_blocks to make preallocation of multi > blocks as in batch operation, so it can avoid lots of redundant > operation, result in better performance. > > In virtual machine, with rotational device:

[PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-09 Thread Chao Yu
This patch introduces reserve_new_blocks to make preallocation of multi blocks as in batch operation, so it can avoid lots of redundant operation, result in better performance. In virtual machine, with rotational device: time fallocate -l 32G /mnt/f2fs/file Before: real0m4.584s user

[PATCH 1/6] f2fs: support in batch multi blocks preallocation

2016-05-09 Thread Chao Yu
This patch introduces reserve_new_blocks to make preallocation of multi blocks as in batch operation, so it can avoid lots of redundant operation, result in better performance. In virtual machine, with rotational device: time fallocate -l 32G /mnt/f2fs/file Before: real0m4.584s user