Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1551770

Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more

From Chao Yu <yuchao0@huawei.com>
Newsgroups linux.kernel
Subject Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more
Date 2017-01-05 10:00 +0100
Message-ID <sWc3U-pg-29@gated-at.bofh.it> (permalink)
References <sUazf-86o-3@gated-at.bofh.it> <sUazf-86o-13@gated-at.bofh.it> <sVQd3-2M8-23@gated-at.bofh.it> <sW6Uy-5xP-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jaegeuk,

I can see patch named ("f2fs: call f2fs_wait_all_discard_bio for an error case")
was merged in dev-test, but I think it's no needed to change error case handling
like this since f2fs_wait_all_discard_bio should always be called after
clear_prefree_segments.

Thanks,

On 2017/1/5 11:19, Chao Yu wrote:
> On 2017/1/4 17:29, Chao Yu wrote:
>> On 2016/12/31 2:51, Jaegeuk Kim wrote:
>>> This patch relaxes async discard commands to avoid waiting its end_io during
>>> checkpoint.
>>> Instead of waiting them during checkpoint, it will be done when actually reusing
>>> them.
>>>
>>> Test on initial partition of nvme drive.
>>>
>>>  # time fstrim /mnt/test
>>>
>>> Before : 6.158s
>>> After : 4.822s
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>
>> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>>
>> One comment below,
> 
> I still have a comment on this patch.
> 
>>> -void f2fs_wait_all_discard_bio(struct f2fs_sb_info *sbi)
>>> +/* This should be covered by global mutex, &sit_i->sentry_lock */
>>> +void f2fs_wait_discard_bio(struct f2fs_sb_info *sbi, unsigned int segno)
>>>  {
>>>  	struct list_head *wait_list = &(SM_I(sbi)->wait_list);
>>>  	struct bio_entry *be, *tmp;
>>> @@ -646,7 +650,15 @@ void f2fs_wait_all_discard_bio(struct f2fs_sb_info *sbi)
>>>  		struct bio *bio = be->bio;
>>>  		int err;
>>>  
>>> -		wait_for_completion_io(&be->event);
>>> +		if (!completion_done(&be->event)) {
>>> +			if ((be->start_segno >= segno &&
>>> +					be->end_segno <= segno) ||
>>
>> segno >= be->start_segno && segno < be->end_segno ?
> 
> Can you check this?
> 
> Thanks,
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Chao Yu <yuchao0@huawei.com> - 2017-01-04 10:40 +0100
  Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Chao Yu <yuchao0@huawei.com> - 2017-01-05 04:30 +0100
    Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Chao Yu <yuchao0@huawei.com> - 2017-01-05 10:00 +0100
      Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Jaegeuk Kim <jaegeuk@kernel.org> - 2017-01-05 21:10 +0100
    Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Jaegeuk Kim <jaegeuk@kernel.org> - 2017-01-05 20:50 +0100
      Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Chao Yu <yuchao0@huawei.com> - 2017-01-06 03:10 +0100
        Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Jaegeuk Kim <jaegeuk@kernel.org> - 2017-01-06 03:50 +0100
          Re: [f2fs-dev] [PATCH 08/10] f2fs: relax async discard commands more Chao Yu <yuchao0@huawei.com> - 2017-01-06 04:40 +0100

csiph-web