From: Hannes Reinecke <hare@suse.de>
To: Nilay Shroff <nilay@linux.ibm.com>, linux-nvme@lists.infradead.org
Cc: hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, dwagner@suse.de,
axboe@kernel.dk, gjoyce@ibm.com
Subject: Re: [RFC PATCHv4 4/6] nvme-multipath: add debugfs attribute adaptive_ewma_shift
Date: Tue, 4 Nov 2025 15:58:05 +0100 [thread overview]
Message-ID: <a93cee4e-dd6b-4696-bced-d00365f93271@suse.de> (raw)
In-Reply-To: <20251104104533.138481-5-nilay@linux.ibm.com>
On 11/4/25 11:45, Nilay Shroff wrote:
> By default, the EWMA (Exponentially Weighted Moving Average) shift
> value, used for storing latency samples for adaptive iopolicy, is set
> to 3. The EWMA is calculated using the following formula:
>
> ewma = (old * ((1 << ewma_shift) - 1) + new) >> ewma_shift;
>
> The default value of 3 assigns ~87.5% weight to the existing EWMA value
> and ~12.5% weight to the new latency sample. This provides a stable
> average that smooths out short-term variations.
>
> However, different workloads may require faster or slower adaptation to
> changing conditions. This commit introduces a new debugfs attribute,
> adaptive_ewma_shift, allowing users to tune the weighting factor.
>
> For example:
> - adaptive_ewma_shift = 2 => 75% old, 25% new
> - adaptive_ewma_shift = 1 => 50% old, 50% new
> - adaptive_ewma_shift = 0 => 0% old, 100% new
>
> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
> drivers/nvme/host/core.c | 3 +++
> drivers/nvme/host/debugfs.c | 46 +++++++++++++++++++++++++++++++++++
> drivers/nvme/host/multipath.c | 8 +++---
> drivers/nvme/host/nvme.h | 1 +
> 4 files changed, 54 insertions(+), 4 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2025-11-04 14:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 10:45 [RFC PATCHv4 0/6] nvme-multipath: introduce adaptive I/O policy Nilay Shroff
2025-11-04 10:45 ` [RFC PATCHv4 1/6] block: expose blk_stat_{enable,disable}_accounting() to drivers Nilay Shroff
2025-11-04 10:45 ` [RFC PATCHv4 2/6] nvme-multipath: add support for adaptive I/O policy Nilay Shroff
2025-11-04 14:57 ` Hannes Reinecke
2025-11-04 10:45 ` [RFC PATCHv4 3/6] nvme: add generic debugfs support Nilay Shroff
2025-11-04 10:45 ` [RFC PATCHv4 4/6] nvme-multipath: add debugfs attribute adaptive_ewma_shift Nilay Shroff
2025-11-04 14:58 ` Hannes Reinecke [this message]
2025-11-04 10:45 ` [RFC PATCHv4 5/6] nvme-multipath: add debugfs attribute adaptive_weight_timeout Nilay Shroff
2025-11-04 14:58 ` Hannes Reinecke
2025-11-04 10:45 ` [RFC PATCHv4 6/6] nvme-multipath: add debugfs attribute adaptive_stat Nilay Shroff
2025-11-04 16:57 ` [RFC PATCHv4 0/6] nvme-multipath: introduce adaptive I/O policy Guixin Liu
2025-11-05 6:57 ` Nilay Shroff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a93cee4e-dd6b-4696-bced-d00365f93271@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=dwagner@suse.de \
--cc=gjoyce@ibm.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox