From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42563C433DB for ; Tue, 19 Jan 2021 02:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16F1E2054F for ; Tue, 19 Jan 2021 02:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394290AbhASCi1 (ORCPT ); Mon, 18 Jan 2021 21:38:27 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11173 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394305AbhASChU (ORCPT ); Mon, 18 Jan 2021 21:37:20 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DKXnG4S31zl6Dj; Tue, 19 Jan 2021 10:35:14 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.214) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 19 Jan 2021 10:36:34 +0800 Subject: Re: [f2fs-dev] [PATCH v4 1/2] f2fs: introduce checkpoint=merge mount option To: Daeho Jeong , , , CC: Sungjong Seo , Daeho Jeong References: <20210119000043.1206345-1-daeho43@gmail.com> From: Chao Yu Message-ID: Date: Tue, 19 Jan 2021 10:36:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20210119000043.1206345-1-daeho43@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.110.154] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/1/19 8:00, Daeho Jeong wrote: > From: Daeho Jeong > > We've added a new mount option "checkpoint=merge", which creates a > kernel daemon and makes it to merge concurrent checkpoint requests as > much as possible to eliminate redundant checkpoint issues. Plus, we > can eliminate the sluggish issue caused by slow checkpoint operation > when the checkpoint is done in a process context in a cgroup having > low i/o budget and cpu shares. To make this do better, we set the > default i/o priority of the kernel daemon to "3", to give one higher > priority than other kernel threads. The below verification result > explains this. > The basic idea has come fromhttps://opensource.samsung.com. > > [Verification] > Android Pixel Device(ARM64, 7GB RAM, 256GB UFS) > Create two I/O cgroups (fg w/ weight 100, bg w/ wight 20) > Set "strict_guarantees" to "1" in BFQ tunables > > In "fg" cgroup, > - thread A => trigger 1000 checkpoint operations > "for i in `seq 1 1000`; do touch test_dir1/file; fsync test_dir1; > done" > - thread B => gererating async. I/O > "fio --rw=write --numjobs=1 --bs=128k --runtime=3600 --time_based=1 > --filename=test_img --name=test" > > In "bg" cgroup, > - thread C => trigger repeated checkpoint operations > "echo $$ > /dev/blkio/bg/tasks; while true; do touch test_dir2/file; > fsync test_dir2; done" > > We've measured thread A's execution time. > > [ w/o patch ] > Elapsed Time: Avg. 68 seconds > [ w/ patch ] > Elapsed Time: Avg. 48 seconds > > Signed-off-by: Daeho Jeong > Signed-off-by: Sungjong Seo Reviewed-by: Chao Yu Thanks,