microsoft / microsoft/WSL

Enable CONFIG_BLK_DEV_UBLK and CONFIG_ZRAM_WRITEBACK in config-wsl

Open Beginner friendly
#41,054 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature kernel
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Microsoft/config-wsl and check whether the arm64 configuration applies the same settings. Run olddefconfig to confirm the requested options remain enabled, then verify that CONFIG_BLK_DEV_UBLK=m and CONFIG_ZRAM_WRITEBACK=y are present in the resulting configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.