Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1356486pxb; Fri, 20 Aug 2021 03:52:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjvoeZYx7EcrDgkT6UypILbUVwK+Q7yOwCKgeh9m/18lDiADkT64BwChmSVJHrbPpIRkL8 X-Received: by 2002:a05:6402:31ae:: with SMTP id dj14mr21450253edb.94.1629456776805; Fri, 20 Aug 2021 03:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629456776; cv=none; d=google.com; s=arc-20160816; b=tV5RjgmcK8PefhZEdZf17O3TOcf4WyT+OWAMK9WvMd1Flz5WDUfGdSZxli46z5YV6D JxRiAxztrsJAUqvwWUnQDz/hqv4Sae3kJ7sML199wTaGwlINJpnUFbFbF4gOh06WQcdE cawKoSFFbbk3dvUFXqSusjIP2+9of+qEGBhxA4gzkSsWCjFjX7oNoNZyRRuXNUY7PAns XZVyrNFyxfRNOFDjDHUCVPF3xbQ4TTJrEpp5opYVcIGNYPyCYJdlMEANoBL0UoHL92A9 M/j9WmCNsWiTq1w4kZY0UDp3lkp/FB3g1jBW/mZ+puyOHNMa7r+F8nxsU5pbdD5yKSoA vK4g== 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=pRHMrWt5baWFODehcO5qugxcRRewSOE85WunY4TY7tg=; b=fCpRtwI9roKLkr59RN71PYbRSPlqkqBfSF5lxrUf7eTGxKtnjHmOa6LLN61zbSYq4p 4aImXescrS7i0LKnVEfzWC0NHCtYgyu7GyYfHxHvV72xOmYqBGphsBmOM1a5RUszm21p XvpCDF9YaufVjSuhhOOtYRYm+qt9hUSJjEg7+E2jbFepOmSNrHIjrmNSF1+b6tzHaLBc q/L/JWBxNUPm/zUeD6UAJYeM/tm5+/yq0rN6GPJmSyYaZ3bqf+RMG4QEv+z008J2vGlM w4Dv2auvkEQtWy0ZggT1f9hUFOP6Ke+MfCYzEB1hFc34AEBkIrCBGFKNC/HaxGzVpvR3 JjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L7lb99ew; 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 u25si6581319edx.116.2021.08.20.03.52.27; Fri, 20 Aug 2021 03:52:56 -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=L7lb99ew; 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 S236704AbhHTKvf (ORCPT + 99 others); Fri, 20 Aug 2021 06:51:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:35764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbhHTKve (ORCPT ); Fri, 20 Aug 2021 06:51:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C00B60FDA; Fri, 20 Aug 2021 10:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629456656; bh=q8gLSnrTAf3x+Wghr7BlfshsmKBhWmCOudXqUTpNQXk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=L7lb99ewy3BYP6mgeycwTX79zyznsksvDG7mQHW/mjHQy1MiO9O6wLT9G6A0qJ/tv CHKdyHe1KBGGtno1+jq8yN0f0YUd9q9U8Wxs1mYfa6D2xbqRIuxNqh3vmrRC52GdgU C/TWLHkTBczm78vSlcx6ogH9OVLpZaJkYI5pkGYW3WBmq9rYmU/8QpCZN5o2hDUA3L HwO757h9VJlZjl8Z2on1nEBvMMVhbXlZ8PZFChf+34fSgvp+ypTx0gttNuBB22y5PE Hbgs6PDnft4a2ZMo90CW+QuD/zJqu+bfxZEMn2qzS06vTlmH5eIpIyfIOabkYinoGA 5bDlJdeybYyuQ== Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: introduce periodic iostat io latency traces To: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Cc: Daeho Jeong References: <20210820035229.216975-1-daeho43@gmail.com> <20210820035229.216975-2-daeho43@gmail.com> From: Chao Yu Message-ID: <48725f58-1a48-73f3-80cf-a0c5efc3b470@kernel.org> Date: Fri, 20 Aug 2021 18:50:54 +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: <20210820035229.216975-2-daeho43@gmail.com> 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/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? > 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. Thanks,