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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 2E454C433E0 for ; Fri, 22 Jan 2021 00:56:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAB2622D50 for ; Fri, 22 Jan 2021 00:56:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726226AbhAVA4a (ORCPT ); Thu, 21 Jan 2021 19:56:30 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11176 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbhAVA4W (ORCPT ); Thu, 21 Jan 2021 19:56:22 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DMLPF0bx9zl8J2; Fri, 22 Jan 2021 08:54:09 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.211) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 22 Jan 2021 08:55:31 +0800 Subject: Re: [f2fs-dev] [PATCH v5 1/2] f2fs: introduce checkpoint=merge mount option To: Daeho Jeong , , , CC: Sungjong Seo , Daeho Jeong References: <20210121134529.1201249-1-daeho43@gmail.com> From: Chao Yu Message-ID: <6e4996f8-fdf0-93dd-8253-9e8f5e6fca06@huawei.com> Date: Fri, 22 Jan 2021 08:55:31 +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: <20210121134529.1201249-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 If there is no update in v5, it will be better to include my Reviewed-by tag, please note that. :) Thanks, On 2021/1/21 21:45, 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 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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 3EE92C433DB for ; Fri, 22 Jan 2021 00:55:59 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E500320769; Fri, 22 Jan 2021 00:55:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E500320769 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1l2kk1-0008Qx-E2; Fri, 22 Jan 2021 00:55:57 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2kk0-0008Qk-AN for linux-f2fs-devel@lists.sourceforge.net; Fri, 22 Jan 2021 00:55:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:CC:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B/xfxbM1r7+H+ADA7G0A/6FrvNpe1RmIpDFD2XkJLv8=; b=E+L0BE1CJ+BRxiOyOQne9AwmpJ 5r888Qo8DcE4vN2EEtZkNdsC46Sml0kzIv0/lorVxn4Ff31fMpreEgUrpoteZ2TLzM6RappWpbfwi I1xso59jHMJRxaf58ErPfZZVJPEU6bXd/mJ/kguFduezpeRMNIEM9SiY5GNhQrqbCJV4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=B/xfxbM1r7+H+ADA7G0A/6FrvNpe1RmIpDFD2XkJLv8=; b=fkqQA9Rrvse+glzlCNCk0jOdFO W1XjC+vDK8yksvmvWlVL02XsrZpaWhJthlC/atsgDo++peWZsrfZVtadh1Zyhasy74hWPLFLv2/1I v+X3n3rvRMh+xZgvr8xjGrh/LI0vjyLhK03ImplIDMiL0MFO0L2z88/Clfwx6cAY1VMc=; Received: from szxga04-in.huawei.com ([45.249.212.190]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1l2kjs-00CAgw-EZ for linux-f2fs-devel@lists.sourceforge.net; Fri, 22 Jan 2021 00:55:56 +0000 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DMLPF0bx9zl8J2; Fri, 22 Jan 2021 08:54:09 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.211) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 22 Jan 2021 08:55:31 +0800 To: Daeho Jeong , , , References: <20210121134529.1201249-1-daeho43@gmail.com> From: Chao Yu Message-ID: <6e4996f8-fdf0-93dd-8253-9e8f5e6fca06@huawei.com> Date: Fri, 22 Jan 2021 08:55:31 +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: <20210121134529.1201249-1-daeho43@gmail.com> Content-Language: en-US X-Originating-IP: [10.136.110.154] X-CFilter-Loop: Reflected X-Headers-End: 1l2kjs-00CAgw-EZ Subject: Re: [f2fs-dev] [PATCH v5 1/2] f2fs: introduce checkpoint=merge mount option X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sungjong Seo , Daeho Jeong Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net If there is no update in v5, it will be better to include my Reviewed-by tag, please note that. :) Thanks, On 2021/1/21 21:45, 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel