mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: cui.tao@linux.dev,tj@kernel.org,josef@toxicopanda.com,axboe@kernel.dk,ameryhung@gmail.com
Cc: cgroups@vger.kernel.org,linux-block@vger.kernel.org,linux-kernel@vger.kernel.org,bpf@vger.kernel.org,andrii@kernel.org,ast@kernel.org,daniel@iogearbox.net,linux-kselftest@vger.kernel.org,cui.tao@linux.dev,cuitao@kylinos.cn,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [RFC PATCH v4 5/5] docs: cgroup-v2: document io.cost model=<name> binding
Date: Wed, 16 Sep 2026 08:22:14 +0000 (UTC)	[thread overview]
Message-ID: <a68ffeb7497f88f7798107f2d93c0ca707fbbb5f1a080f8f268eb5d13367159d@mail.kernel.org> (raw)
In-Reply-To: <20260916072302.1068871-6-cui.tao@linux.dev>

[-- Attachment #1: Type: text/plain, Size: 2546 bytes --]

> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 86a2a0099178e..5786d86eceeae 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst

[ ... ]

> @@ -2120,6 +2120,18 @@ IO Interface Files
>  	parameters are written to, "ctrl" become "user" and the
>  	automatic changes are disabled.
>
> +	When CONFIG_BLK_CGROUP_IOCOST_BPF is enabled, "model" also accepts
> +	the name of a registered iocost_model_ops BPF struct_ops model:
> +	"model=<name>" binds the model to the device and the model fully
> +	replaces the builtin linear pricing, for every operation including
> +	flushes; "model=linear" (or "ctrl=auto/user") restores the builtin
> +	model.  Writing an unknown name fails with ENOENT and nothing is
> +	applied.  Unregistering a model removes its name so it can no
> +	longer be selected; devices already bound keep using it, and keep
> +	receiving cgroup lifecycle notifications, until switched back to
> +	the builtin model.  See
> +	include/linux/blk-iocost.h for the model interface.
> +

Does this section need to document what io.cost.model reads back with
a BPF model bound?

Looking at ioc_cost_model_prfill() in block/blk-iocost.c, when a BPF
model is bound, the file prints:

    seq_printf(sf, "%s ctrl=%s model=%s\n",
        dname, model ? "bpf" : ioc->user_cost_model ? "user" : "auto",
        model ? model->name : "linear");

So with a model bound, io.cost.model reads back "ctrl=bpf model=<name>".

The nested-key table nine lines above this paragraph lists the possible
values:

    =====           ================================
    ctrl            "auto" or "user"
    model           The cost model in use - "linear"
    =====           ================================

This table doesn't include "bpf" as a ctrl value or "<name>" as a model
value. The new paragraph also doesn't mention that "ctrl=bpf" is accepted
on write - ioc_cost_model_write() special-cases it so saved configurations
can be restored:

    } else if (!strcmp(buf, "bpf")) {
        /* readback value; keep the bound model */
        continue;
    }

Should the table be updated to include the "bpf" ctrl value and the
"<name>" model value, so the section documents what the kernel actually
prints?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/35070283830

      reply	other threads:[~2026-09-16  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  7:22 [RFC PATCH v4 0/5] blk-iocost: BPF struct_ops cost model Tao Cui
2026-09-16  7:22 ` [RFC PATCH v4 1/5] blk-iocost: add BPF struct_ops cost model support Tao Cui
2026-09-16  7:22 ` [RFC PATCH v4 2/5] selftests/bpf: add iocost cost model test Tao Cui
2026-09-16  7:23 ` [RFC PATCH v4 3/5] blk-iocost: add iocost_ioc_tick tracepoint for per-period device summary Tao Cui
2026-09-16  7:23 ` [RFC PATCH v4 4/5] selftests/bpf: add multi-stream sequentiality example model Tao Cui
2026-09-16  7:23 ` [RFC PATCH v4 5/5] docs: cgroup-v2: document io.cost model=<name> binding Tao Cui
2026-09-16  8:22   ` bot+bpf-ci [this message]

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=a68ffeb7497f88f7798107f2d93c0ca707fbbb5f1a080f8f268eb5d13367159d@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bpf@vger.kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=cui.tao@linux.dev \
    --cc=cuitao@kylinos.cn \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=josef@toxicopanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=mason@kernel.org \
    --cc=tj@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®