Control: tag -1 moreinfo

On Sun, 23 Mar 2025 08:46:28 +0100 Salvatore Bonaccorso
<car...@debian.org> wrote:
[...]
> it has passed a substantial amount of time and we did not respond,
> apologies about that.
> 
> In my opinion we should leave it as module, people wanting to use that
> setup can load the module by own means and do additional configuration
> selecting the bfq scheduler, and think resepctive units will as well
> need to enable the IOAccounting (correct me if I'm wrong)?
> 
> Given this reply now, and time permitting we might discuss it in our
> next kernel-team weekly meeting.

We discussed this in a kernel team meeting and I agreed to look at what
was going on here.

In a test VM with 6.12.16-amd64:

- When I enable the "io" controller for a cgroup, I see an "io.weight"
  attribute in that cgroup.  So the originally reported problem has been
  fixed.

- With bfq not yet loaded, I can still set it as a scheduler and the
  module is auto-loaded:

      # cd /sys/class/block/vda/queue
      # cat scheduler 
      [none] mq-deadline 
      # echo bfq > scheduler 
      # cat scheduler 
      none mq-deadline [bfq] 

- After that, the cgroup also has an "io.bfq.weight" attribute.

systemd tries to set both attributes, which should cover devices with
BFQ and other schedulers.  But I see a problem with this sequence of
events:

1. systemd creates the cgroup for a service and sets its "io.weight"
attribute only, as bfq is not yet loaded.

2. The scheduler of a block device that the service will use is changed
to "bfq".  The bfq module is loaded and this cgroup gets an
"io.bfq.weight" attribute, but with a default value.

So far as I can see, neither the kernel nor systemd will synchronise the
added "io.bfq.weight" attribute with the "io.weight" attribute in step
2.  Whereas if bfq was built-in, this wouldn't be a problem.

Ryutaroh, do you consider your bug report to be fixed, or is the problem
I described above part of the bug?

Ben.

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to