Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1565231pxb; Fri, 20 Aug 2021 08:28:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDw9GU8X2aDHdcaD0bHGLY6j6Iw+5RdAsTy/z7N5y3OexYfRRMOc2Bo4pGiBvQZnEWdB9q X-Received: by 2002:a6b:611a:: with SMTP id v26mr8261565iob.93.1629473284328; Fri, 20 Aug 2021 08:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629473284; cv=none; d=google.com; s=arc-20160816; b=Q/WZOSm+d9EDujZ1mxIOIRF26goNdF2urMpQiNVYIrLW6vvFjZIWKLAx/HSFGx2YsY Mrn+xaTw5R8NqlVCACaMLV0p3qsnHg0xETT0uXgoe2gIamgn17tUcArPuYqIWbpdv3Da XXJlfEvYyBGtlmsOZCnfWzxRnx+/vFqUiPGbh4B2DmhZgcbtDEP1DAuyxnkUUO7DJUjj NENI+WJX/PZK2XUlOWncoo17N2TJuyrpx9tE/r8N2w4wucr75ba0gHTbkw3UujWHV7US hrQfr939CO/kNQwa0lVLFrNcDlilVEJQOdXUsvDYyD2+flhPHtcu2K6pd52DAePwh5nl Q+QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LmlIpUuRl+AQl6NHORx2uksaHk6e1Bkml3gkzzdbETU=; b=wKxs5dn+VVueDJwGMdjkAHvMiY9S/4I1CP+vCwG8ISYMn597jxaiRws+UyyRPTVinO gYJYiPqjo9262Uf08EG24Bm5UajwkHwcesbg9dZC3a6Ylx/u+OXw/ZunMFN2PO+PAItH gHNZIawnz9tbBSgzmNmjBqohm6tFedvjyjJ5alIa8weN2gB56BY51pwRTJIgYAJWbB/6 tFyAJ+GbxvvxZnj9g25M6+EAAdR5BnFCy01UH88WTSIM72ngR1/B6I22lEVUAn8O8HuH lgbb9p7R1uzeTMYTkhEKJip48bHSVtRh/DGUfzwZtNsaJWZqCIBDAUxQ+TMpyIip0L0T Q8uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lfsgunIB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si8709867ilj.10.2021.08.20.08.27.51; Fri, 20 Aug 2021 08:28:04 -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=@gmail.com header.s=20161025 header.b=lfsgunIB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241065AbhHTP11 (ORCPT + 99 others); Fri, 20 Aug 2021 11:27:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241289AbhHTP1T (ORCPT ); Fri, 20 Aug 2021 11:27:19 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C9E5C0613A4 for ; Fri, 20 Aug 2021 08:23:19 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id u22so21272635lfq.13 for ; Fri, 20 Aug 2021 08:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LmlIpUuRl+AQl6NHORx2uksaHk6e1Bkml3gkzzdbETU=; b=lfsgunIBPvh1N2HMfHLuTu6bb4D3MC64EfdWNwsp5/I6e9+sfnYHnIciUn9iZmjfE0 RpMGbkMBlb41YT2k/VuMPHP5HH0vI1ft3AxZAqjXqSV2D48lo2PyvBqf1WE8groFrbSz piCHKr+s5jQ3BOWinXhcxtVn97Y2iAAcvrQ+yyehKq2a2l3LGlvs/TU3UNUT3xIayr0A upenWwnnUkAajCqzvvSGk9T7fSjgoGzVxrO0LYkz2bj/FByEg0EKheI4pi9b07cRPfpH SnvrUc9FNOeQ6o8yxGKnMLHduaRcnUfRnEr9uicYa2qgy2arR6dkRInN0Y84ycx9HbD7 Hczg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LmlIpUuRl+AQl6NHORx2uksaHk6e1Bkml3gkzzdbETU=; b=ca3OFHTPU2PqSzEUUDt9RbxJEOvESfYVM+GnPeBHzEFHltvygv9QAGItrSGNO29UaH Ytm5CnRqjRR7E8PxgQB2KDMc4IM8R+ttylRlnrM5AkMb7b+r8IEYdO3dHvnNfsqgvaZo H7GxIFERG4xNTdTGlWwgmo/2rhFLsxv9FrzJ8AdWbJaeawIlqXRgDM1hqh9la164yG3v k0divu40ZdTQXFM2ogt2j4xAKd/u9U7rTycENXt7yO4Slxe/wQZoBcDYlHonSBO2r+0g BNqs+BqWqhmK5EFucF4eTHcgxhSWpqBZbZMoHWBPqcrpKcneoqNGI5QLTiUDzF6jHN9H kVBg== X-Gm-Message-State: AOAM533MAMAzZ+UbwAJ2wExTBqyAOmmtKxzl+ieKvGy8/0e00PTqowBr U+jUIRDPtKe629HcF7oIgqJW39whwZ7tG0ExrgE= X-Received: by 2002:ac2:4573:: with SMTP id k19mr14978867lfm.622.1629472996150; Fri, 20 Aug 2021 08:23:16 -0700 (PDT) MIME-Version: 1.0 References: <20210820035229.216975-1-daeho43@gmail.com> <20210820035229.216975-2-daeho43@gmail.com> <48725f58-1a48-73f3-80cf-a0c5efc3b470@kernel.org> In-Reply-To: <48725f58-1a48-73f3-80cf-a0c5efc3b470@kernel.org> From: Daeho Jeong Date: Fri, 20 Aug 2021 08:23:05 -0700 Message-ID: Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: introduce periodic iostat io latency traces To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 20, 2021 at 3:50 AM Chao Yu wrote: > > On 2021/8/20 11:52, Daeho Jeong wrote: > > +void iostat_update_and_unbind_ctx(struct bio *bio, int rw) > > +{ > > + struct bio_iostat_ctx *iostat_ctx = bio->bi_private; > > + int sync_type = bio->bi_opf & REQ_SYNC ? 0 : 1; > > int sync_type = bio->bi_opf & REQ_SYNC ? 1 : 0; > > Right? This means just type, not boolean number. So, I set type 0 is sync and type 1 is async. > > > int f2fs_init_iostat(struct f2fs_sb_info *sbi) > > { > > /* init iostat info */ > > spin_lock_init(&sbi->iostat_lock); > > + spin_lock_init(&sbi->iostat_lat_lock); > > sbi->iostat_enable = false; > > sbi->iostat_period_ms = DEFAULT_IOSTAT_PERIOD_MS; > > + sbi->iostat_io_lat = f2fs_kzalloc(sbi, sizeof(struct iostat_lat_info), > > + GFP_KERNEL); > > + if (!sbi->iostat_io_lat) > > + return -ENOMEM; > > What do you think of just embedding iostat_io_lat structure into f2fs_sb_info > structure? it's minor thing though. > I also wanted to do that, but if we embed this type, we need to define that structure in f2fs.h file. Is it okay with you? > Thanks,