All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Kaitao Cheng" <kaitao.cheng@linux.dev>, "Jens Axboe" <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<bpf@vger.kernel.org>, "Kaitao Cheng" <chengkaitao@kylinos.cn>
Subject: Re: [RFC v3 0/3] block: Introduce a BPF-based I/O scheduler
Date: Sat, 03 Oct 2026 09:36:59 +0000	[thread overview]
Message-ID: <DLV3OID9H5E8.2W0GIOP8FHJRN@gmail.com> (raw)
In-Reply-To: <20261003042748.33795-1-kaitao.cheng@linux.dev>

On Sat, Oct 03, 2026 at 12:27 PM Kaitao Cheng <kaitao.cheng@linux.dev> wrote:
> PFQ gives us a concrete policy to explore how well the UFQ interface
> supports more involved scheduling decisions and to guide further work on
> the framework. It has not yet been used in production, and further testing
> and workload evaluation are needed.

Third version in six months and still not a single number.
v2 got replies from the bots only.
Without a solid use case there is no point in polishing this.

> In particular, I would appreciate suggestions on the boundary between the
> UFQ framework and BPF policies, the struct_ops interface, and request
> ownership and fallback handling.

One global ufq_ops for all disks is not the best shape.
I'd do it like bpf_qdisc.

The ownership is the bigger problem.
The request sits in ctx->rq_lists and in a bpf map at the same time
and the kernel relies on the prog to keep the two in sync.
The prog holds rq->ref. rq holds q_usage_counter until
__blk_mq_free_request(). One request that the prog didn't return
from dispatch_req or left in a map and blk_mq_freeze_queue() waits
forever.
sched_ext has a watchdog that kicks the bpf scheduler out.
Something like that is necessary here too.

pw-bot: cr

  parent reply	other threads:[~2026-10-03  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  4:27 [RFC v3 0/3] block: Introduce a BPF-based I/O scheduler Kaitao Cheng
2026-10-03  4:27 ` [RFC v3 2/3] tools/ufq_iosched: add BPF example scheduler and build scaffolding Kaitao Cheng
2026-10-03  4:44   ` sashiko-bot
2026-10-03  4:27 ` [RFC v3 1/3] block: Introduce the UFQ I/O scheduler Kaitao Cheng
2026-10-03  4:45   ` sashiko-bot
2026-10-03  4:27 ` [RFC v3 3/3] tools/ufq_iosched: add PFQ eBPF " Kaitao Cheng
2026-10-03  4:42   ` sashiko-bot
2026-10-03  9:36 ` Alexei Starovoitov [this message]
2026-10-03 11:15   ` [RFC v3 0/3] block: Introduce a BPF-based " Kaitao Cheng

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=DLV3OID9H5E8.2W0GIOP8FHJRN@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bpf@vger.kernel.org \
    --cc=chengkaitao@kylinos.cn \
    --cc=kaitao.cheng@linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.