Skip to content

Enable CONFIG_BLK_DEV_UBLK and CONFIG_ZRAM_WRITEBACK in config-wsl #41054

Description

@emersonbusson

Is your feature request related to a problem? Please describe.

I've been building a multi-tier swap stack on WSL2 (compressed RAM + a userspace block backend for colder pages). On the stock Microsoft kernel both of these show up as off:

# CONFIG_BLK_DEV_UBLK is not set
# CONFIG_ZRAM_WRITEBACK is not set

CONFIG_ZRAM itself is already =m and swap works fine. I/O uring is already on. NBD is there as a module too. So the missing pieces are specifically ublk and zram writeback.

Without them I have to rebuild from https://github.com/microsoft/WSL2-Linux-Kernel every time I want ublk (instead of sitting on NBD only) or attach a writeback device under zram. That works, but it's a lot of friction for something that is already upstream and only needs a config flip.

Describe the solution you'd like

In Microsoft/config-wsl (and arm64 if it applies the same way):

CONFIG_BLK_DEV_UBLK=m
CONFIG_ZRAM_WRITEBACK=y

Module for ublk so it stays out of the way until someone loads it. Writeback only does something if userspace actually sets a backing device.

Describe alternatives you've considered

  • Custom kernel from linux-msft-wsl-6.18.y / 6.6.y with those two options forced on. This works on my machine today.
  • Stick to NBD only. Fine for experiments, worse latency/CPU profile than ublk for the same userspace server in my tests.

I'd rather not carry a private kernel long-term if the stock config can ship the modules.

Additional context

Checked against a recent config-wsl from the 6.18.y line. After olddefconfig both options stick cleanly:

  • CONFIG_BLK_DEV_UBLK=m
  • CONFIG_ZRAM_WRITEBACK=y

No out-of-tree modules involved — just enabling code that is already in the tree you ship.

Happy to retest on a preview kernel if that helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions