# Torvalds Calls sched_ext Code "Disgusting" and Forces a Cleanup

- **Published on:** 2026-06-23
- **Category:** News
- **Original page:** https://linuxgratis.com/en/articles/linux-sched-ext-codigo-reestructurado-queja-torvalds

Linus Torvalds reluctantly merged the sched_ext changes for Linux 7.2 but slammed the loose ext_* files dropped into kernel/sched. Days later a pull request moved them into kernel/sched/ext/.

---

The main set of **sched_ext** changes landed last week for **Linux 7.2**, with continued work on sub-scheduler support. **Linus Torvalds** had no problem with the features of this extensible scheduling framework, which relies on user-space BPF programs. What he did object to was how the source files were laid out.

Last week's pull request added several new C and header files with the `ext_` prefix directly inside `kernel/sched`, rather than creating a dedicated subdirectory. Torvalds merged the code anyway, but left a comment that left little doubt about his view:

> create mode 100644 kernel/sched/ext_arena.c
> create mode 100644 kernel/sched/ext_arena.h
> create mode 100644 kernel/sched/ext_cid.c
> create mode 100644 kernel/sched/ext_cid.h
> create mode 100644 kernel/sched/ext_types.h
>
> Please don't do this disgusting thing. There's a reason we have subdirectories: it's to group files together and separate them out. Using name prefixing instead of directories is disgusting and wrong. If you have this many random sched-ext files, it damn well should be cleaned up and not be this kind of mess. I've pulled this, but under protest. Proper hierarchical filesystems have been available since 1965.

His point: prefixing file names instead of using directories is the wrong call. If there are this many loose sched_ext files, they belong in their own folder. He took the merge "under protest" and added his usual jab that hierarchical filesystems have existed since 1965.

## The reorganization is already in

The message worked fast. A new pull request went out today to reorganize the sched_ext source tree so it uses `kernel/sched/ext/` instead of scattering a bunch of `ext_*` files across the common scheduler directory. Torvalds has already merged that restructuring code.

The change is purely organizational. It moves files such as `ext_arena.c`, `ext_arena.h`, `ext_cid.c`, `ext_cid.h` and `ext_types.h` into the new folder. It does not touch sched_ext functionality or the sub-scheduler support shipping in this batch. For anyone building the kernel from source or tracking Torvalds' tree, the only thing that changes is the file paths.

## Who this matters to

If you write custom schedulers with sched_ext, maintain patches on top of the kernel tree, or just follow **Linux 7.2** development closely, note the new location under `kernel/sched/ext/`. For the desktop user who only installs their distribution's kernel, the effect is nil: it's an internal directory-structure change.

The episode is another reminder of how much the kernel community cares about form. The functionality passed without trouble; the messy file tree did not. To catch up on what this branch brings, read [the Linux 7.1 highlights](/en/linux-kernel-7-1-lanzamiento-oficial-novedades), the release that opened the 7.2 merge window. Full version details are on the [Linux Kernel](/en/linux-kernel) page.

## Source

[Phoronix: "Disgusting" Linux sched_ext Source Code Restructured Following Complaint By Linus Torvalds](https://www.phoronix.com/news/Linux-Sched-Ext-Restructured)
