Linux block layer
 help / color / mirror / Atom feed
From: Tero Kristo <tero.kristo@linux.intel.com>
To: axboe@kernel.dk
Cc: hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCHv2 0/2] blk-mq: add CPU latency limit control
Date: Fri, 18 Oct 2024 10:30:36 +0300	[thread overview]
Message-ID: <20241018075416.436916-1-tero.kristo@linux.intel.com> (raw)

Hello,

Try #2 of the patches here. I sent earlier an RFC version against block/bio
[1], and then an isolated patch for NVMe driver only [2].

After feedback from maintainers, I've reworked the patches again to block
layer, this time to multiqueue support only. Once a blk-mq request is about
to be dispatched to the driver layer, the PM QoS variables for active CPUs
are tweaked based on configuration, and a timeout is launched as a delayed
work that drops the PM QoS limits once the queue is idle. The mechanism is
disabled by default, and only enabled once user activates it via the
provided sysfs knobs.

Some measurement data provided below as a reference for the
results, measured with 'fio' on an Intel Icelake Xeon platform, with an
extra NVMe card on the system. Both latency and bandwidth values are
provided, to showcase that the latency is reduced and bandwidth is not
impacted negatively due to overhead. C6 residency measurement is not
very accurate in my test leading to somewhat glitchy result on its
value (c6%).

key:
  slat: start latency max, in us
  clat: completion latency max, in us
  lat: overall latency max, in us
  bw: min-avg-max bandwidth values
  c6%: c6 (deep idle) residency for the active CPU during the test

cpu_lat_limit_us=10 (enabled)
  slat: 63, clat: 107, lat: 115, bw: 1177-1367-1397, c6%: 11.9
  slat: 30, clat: 129, lat: 137, bw: 1196-1380-1409, c6%: 0.9
  slat: 60, clat: 101, lat: 109, bw: 1193-1372-1407, c6%: 0.9
  slat: 29, clat: 135, lat: 143, bw: 1184-1369-1398, c6%: 1.0
  slat: 29, clat: 112, lat: 120, bw: 1188-1368-1397, c6%: 1.0
cpu_lat_limit_us=-1 (disabled)
  slat: 106, clat: 281, lat: 353, bw: 1183-1363-1403, c6%: 79.9
  slat: 107, clat: 270, lat: 319, bw: 1192-1370-1406, c6%: 79.8
  slat: 156, clat: 269, lat: 323, bw: 1187-1363-1398, c6%: 80.4
  slat: 106, clat: 267, lat: 316, bw: 1183-1367-1402, c6%: 80.5
  slat: 108, clat: 247, lat: 313, bw: 1186-1368-1404, c6%: 80.0
  slat: 107, clat: 274, lat: 323, bw: 1188-1361-1399, c6%: 80.0

-Tero

[1] https://lore.kernel.org/lkml/ZtHWkn2FJhAa+Vvo@fedora/T/
[2] https://lore.kernel.org/lkml/20241004101014.3716006-1-tero.kristo@linux.intel.com/


             reply	other threads:[~2024-10-18  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18  7:30 Tero Kristo [this message]
2024-10-18  7:30 ` [PATCHv2 1/2] block/genhd: add sysfs knobs for the CPU latency PM QoS settings Tero Kristo
2024-10-18  7:30 ` [PATCHv2 2/2] blk-mq: add support for CPU latency limits Tero Kristo
2024-10-18 14:21   ` Jens Axboe
2024-10-23 13:26     ` Tero Kristo
2024-10-23 13:48       ` Jens Axboe
2024-10-23 14:06 ` [PATCH v3 " Tero Kristo

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=20241018075416.436916-1-tero.kristo@linux.intel.com \
    --to=tero.kristo@linux.intel.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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