Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739774
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Chao Yu <yuchao0@huawei.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Revert "f2fs: node segment is prior to data segment selected victim" |
| Date | Tue, 26 Sep 2017 12:50:01 +0200 |
| Message-ID | <utVB7-3Ca-1@gated-at.bofh.it> (permalink) |
| References | <usOBI-18b-15@gated-at.bofh.it> <utrMK-bc-7@gated-at.bofh.it> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="windows-1252" |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| X-Originating-IP | [10.134.22.195] |
| X-Cfilter-Loop | Reflected |
| X-Mirapoint-Virus-Rapid-Raw | score=unknown(0), refid=str=0001.0A090203.59CA2F80.0135,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 |
| X-Mirapoint-Loop-ID | c56bcef37e4c48f0b4a9be47d950f852 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 78 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <miaoxie@huawei.com>, <bintian.wang@huawei.com>, <linux-fsdevel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>, <linux-kernel@vger.kernel.org> |
| X-Original-Date | Tue, 26 Sep 2017 18:44:07 +0800 |
| X-Original-Message-ID | <6b5c95de-9349-3ee6-ac46-34684bdf3cf1@huawei.com> |
| X-Original-References | <1506157338-20441-1-git-send-email-yunlong.song@huawei.com> <ae11fe8d-6030-ed2a-1193-74dc43aa0279@huawei.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1739774 |
Show key headers only | View raw
On 2017/9/25 10:52, Chao Yu wrote:
> On 2017/9/23 17:02, Yunlong Song wrote:
>> This reverts commit b9cd20619e359d199b755543474c3d853c8e3415.
>>
>> That patch causes much fewer node segments (which can be used for SSR)
>> than before, and in the corner case (e.g. create and delete *.txt files in
>> one same directory, there will be very few node segments but many data
>> segments), if the reserved free segments are all used up during gc, then
>> the write_checkpoint can still flush dentry pages to data ssr segments,
>> but will probably fail to flush node pages to node ssr segments, since
>> there are not enough node ssr segments left (the left ones are all
>> full).
>
> IMO, greedy algorithm wants to minimize price of moving one dirty segment, our
> behavior is accord with semantics of our algorithm to select victim with least
> valid blocks. Pengyang's patch tries to adjust greedy algorithm to consider
> minimizing total number of valid blocks in all selected victim segments during
> whole FGGC cycle, but its algorithm is corrupted, since if all valid data blocks
> in current victim segment is not belong to different dnode block, our selection
> may be incorrect.
>
> Anyway, I agree to revert Pengyang's patch first before we got a entire scheme.
Please replace old commit message with above reason. :)
Thanks,
>
> BTW, for SSR or LFS selection, there is a trade-off in between: a) SSR-write
> costs less free segment and move less data/node blocks, but it triggers random
> write which results in bad performance. b) LFS-write costs more free segment and
> move more data/node blocks, but it triggers sequential write which results in
> good performance. So I don't think more SSR we trigger, lower latency our FGGC
> faces.
>
> Thanks,
>
>>
>> So revert this patch to give a fair chance to let node segments remain
>> for SSR, which provides more robustness for corner cases.
>>
>> Conflicts:
>> fs/f2fs/gc.c
>> ---
>> fs/f2fs/gc.c | 12 +-----------
>> 1 file changed, 1 insertion(+), 11 deletions(-)
>>
>> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
>> index bfe6a8c..f777e07 100644
>> --- a/fs/f2fs/gc.c
>> +++ b/fs/f2fs/gc.c
>> @@ -267,16 +267,6 @@ static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno)
>> return UINT_MAX - ((100 * (100 - u) * age) / (100 + u));
>> }
>>
>> -static unsigned int get_greedy_cost(struct f2fs_sb_info *sbi,
>> - unsigned int segno)
>> -{
>> - unsigned int valid_blocks =
>> - get_valid_blocks(sbi, segno, true);
>> -
>> - return IS_DATASEG(get_seg_entry(sbi, segno)->type) ?
>> - valid_blocks * 2 : valid_blocks;
>> -}
>> -
>> static inline unsigned int get_gc_cost(struct f2fs_sb_info *sbi,
>> unsigned int segno, struct victim_sel_policy *p)
>> {
>> @@ -285,7 +275,7 @@ static inline unsigned int get_gc_cost(struct f2fs_sb_info *sbi,
>>
>> /* alloc_mode == LFS */
>> if (p->gc_mode == GC_GREEDY)
>> - return get_greedy_cost(sbi, segno);
>> + return get_valid_blocks(sbi, segno, true);
>> else
>> return get_cb_cost(sbi, segno);
>> }
>>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Revert "f2fs: node segment is prior to data segment selected victim" Yunlong Song <yunlong.song@huawei.com> - 2017-09-23 11:10 +0200
Re: [PATCH] Revert "f2fs: node segment is prior to data segment selected victim" Chao Yu <yuchao0@huawei.com> - 2017-09-25 05:00 +0200
Re: [PATCH] Revert "f2fs: node segment is prior to data segment selected victim" Chao Yu <yuchao0@huawei.com> - 2017-09-26 12:50 +0200
csiph-web