Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp1268773pxb; Fri, 13 Aug 2021 19:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYyM4v+VBANaZ6nH+ojhZb6R7IPJh004vMXZV631GpITgAkWB8bY3GXiSxE/Y1zOtc7JkR X-Received: by 2002:a5d:898f:: with SMTP id m15mr4203702iol.188.1628906837184; Fri, 13 Aug 2021 19:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628906837; cv=none; d=google.com; s=arc-20160816; b=PEJDy2iWRNw2u36Xb7Je6UpxbIwl2cs2MN0HLTjv7Qz03suMHOysQhnxulRt/uUJn8 wlWn4WhptVrEg6bqG+vkA+gJ5c2x7k6hT+Knrtf2399isonArMQ5HLS4aSunWYX8tenV wPiAOn4lYnUXv3YVgjCBk10qSzCaWqD+I2kVGTdkipeEe5/vLbGE84JhVFc71nf7QLCR /TtVr4wF6+j32JTrMczxhHqEw01eNDXJUfSlARIht8S1kqTLl8X1F8TYcnLcBP/CRoTQ 1npHfAjbNiJvO5yrxotlML07wLfbHvWLp2MoqFt1tvlQeUD8Ph7O/YjVVUyy42BrbFvs d6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=JMlhkldRg+iQ6N9Hy6Owmj00mhk0Sqzz5Ek+fpXrdaI=; b=qJYbiZSphPOP9TxVPT3APc2D6rh7c9EaGrxqA0037jBMSmABsN0jIPJYFzHxA4Squg X7oYExtQPBgWzY4F2HyDe38N0y5ru/0YuRMVv/bM0NR2pJW8byXwezxVNp977GWq5E+v aVfUKOTzwiq5VIVzHKbXiSFMgVe8mDblmiBawPEWGv1mm4lBw1YBiZ8vQoBaowhrNSLz zQ7MhaO8N+ZwcDDlscfXJd7Ku9IsS/+qi5mu6BSGgjNJOBuf+uo/298VOmiSGrw/9f7z cnmb//iBT+Tq+v75HuZEu1UqTqD/lZUBW09uD1yLukh7IKXw/4Zdps2Qm30MB9UWCtH/ VS4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KXbOK6Cm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q20si3676166iod.32.2021.08.13.19.06.56; Fri, 13 Aug 2021 19:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KXbOK6Cm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236466AbhHNCGi (ORCPT + 99 others); Fri, 13 Aug 2021 22:06:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:52204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbhHNCGg (ORCPT ); Fri, 13 Aug 2021 22:06:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A48B6103A; Sat, 14 Aug 2021 02:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628906769; bh=AJyfRoBiN6vd4Qg70MgtNw0Vq/ShFqNrZMSRs0ia4OM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=KXbOK6CmPDAZSIgOGq8qFrRCB/AqLpDaZmbm1i5bNjvQYzi8JrcOiaJ+Bg/nslpJb Rg9rL5U1pGBCggSaHbiKqe0wJLbFYBxhFecTmww8XKnp01ttJPyOhutU7ZtcPUV1OV zvi+mAFc2oNSlj6U7vPmb2yucVaD5k4YoXZF+FKAKSvl7cThTP/UO3SxML2IWX13jl 6UnZ8l69Gv/IMFtEc64Q3ddUJfmAJDyPoso1TE5zWoHsYOjKIMWjoWI6/AYh76F7ZB X5IHHSFiWY4Pm8nCpzSTHN65qcie56Sl3eTPyW8LhH4CXixNB43ScV3Vbm3oUuNyTk luIx8b4+wl79Q== Subject: Re: [f2fs-dev] [PATCH v2] f2fs: introduce periodic iostat io latency traces To: Jaegeuk Kim Cc: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong References: <20210803225542.3487172-1-daeho43@gmail.com> <2a79c1c5-366b-92d9-4025-dbda660b1178@kernel.org> From: Chao Yu Message-ID: Date: Sat, 14 Aug 2021 10:06:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/8/14 2:56, Jaegeuk Kim wrote: > On 08/13, Chao Yu wrote: >> On 2021/8/13 4:52, Jaegeuk Kim wrote: >>> On 08/11, Chao Yu wrote: >>>> Hi Daeho, >>>> >>>> On 2021/8/4 6:55, Daeho Jeong wrote: >>>>> From: Daeho Jeong >>>>> >>>>> Whenever we notice some sluggish issues on our machines, we are always >>>>> curious about how well all types of I/O in the f2fs filesystem are >>>>> handled. But, it's hard to get this kind of real data. First of all, >>>>> we need to reproduce the issue while turning on the profiling tool like >>>>> blktrace, but the issue doesn't happen again easily. Second, with the >>>>> intervention of any tools, the overall timing of the issue will be >>>>> slightly changed and it sometimes makes us hard to figure it out. >>>>> >>>>> So, I added F2FS_IOSTAT_IO_LATENCY config option to support printing out >>>>> IO latency statistics tracepoint events which are minimal things to >>>>> understand filesystem's I/O related behaviors. With "iostat_enable" sysfs >>>>> node on, we can get this statistics info in a periodic way and it >>>>> would cause the least overhead. >>>>> >>>>> [samples] >>>>> f2fs_ckpt-254:1-507 [003] .... 2842.439683: f2fs_iostat_latency: >>>>> dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count], >>>>> rd_data [136/1/801], rd_node [136/1/1704], rd_meta [4/2/4], >>>>> wr_sync_data [164/16/3331], wr_sync_node [152/3/648], >>>>> wr_sync_meta [160/2/4243], wr_async_data [24/13/15], >>>>> wr_async_node [0/0/0], wr_async_meta [0/0/0] >>>>> >>>>> f2fs_ckpt-254:1-507 [002] .... 2845.450514: f2fs_iostat_latency: >>>>> dev = (254,11), iotype [peak lat.(ms)/avg lat.(ms)/count], >>>>> rd_data [60/3/456], rd_node [60/3/1258], rd_meta [0/0/1], >>>>> wr_sync_data [120/12/2285], wr_sync_node [88/5/428], >>>>> wr_sync_meta [52/6/2990], wr_async_data [4/1/3], >>>>> wr_async_node [0/0/0], wr_async_meta [0/0/0] >>>>> >>>>> Signed-off-by: Daeho Jeong >>>>> >>>>> --- >>>>> v2: clean up with wrappers and fix a build breakage reported by >>>>> kernel test robot >>>>> --- >>>>> fs/f2fs/Kconfig | 9 +++ >>>> >>>> I try to apply this patch in my local dev branch, but it failed due to >>>> conflicting with below commit, it needs to rebase this patch to last dev >>>> branch. >>> >>> I applied this in dev branch. Could you please check? >> >> Yeah, I see. >> >>>>> +config F2FS_IOSTAT_IO_LATENCY >>>>> + bool "F2FS IO statistics IO latency information" >>>>> + depends on F2FS_FS >>>>> + default n >>>>> + help >>>>> + Support printing out periodic IO latency statistics tracepoint >>>>> + events. With this, you have to turn on "iostat_enable" sysfs >>>>> + node to print this out. >>>> >>>> This functionality looks independent, how about introuducing iostat.h >>>> and iostat.c (not sure, maybe trace.[hc])to include newly added structure >>>> and functions for dispersive codes cleanup. >> >> Thoughts? this also can avoid using CONFIG_F2FS_IOSTAT_IO_LATENCY in many places. > > It seems there's somewhat dependency with iostat which is done by default. > How about adding this by default as well in the existing iostat, and then > covering all together by F2FS_IOSTAT? Agreed. Any thoughts about using separated files to maintain these independent functionality codes? like we did in trace.[hc] previously. Thanks, > >> >> Thanks,