Broken WCHAN in modern x86 kernel defconfig? Intentional?

From: Vito Caputo
Date: Mon Sep 13 2021 - 21:26:15 EST


Hello lkml,

Recently I've been using an Arch machine with the distro-provided
kernel, and noticed the wchan is never set for any processes. This
seems rather odd for a generic distro-provided kernel, since it breaks
basic functionality like showing WCHAN in `top` or `ps -o wchan`.

Looking at /proc/config.gz I see only CONFIG_SCHED_OMIT_FRAME_POINTER=y
set WRT frame pointers, but I thought this meant I'd still see
non-zero wchans in /proc/*/wchan. It's not like it contains
CONFIG_FRAME_POINTER=n, it simply doesn't mention it at all.

For many years I've been running custom kernels on Debian built from
the same .config that's just kept evolving over time. So I wouldn't
have noticed if at some point CONFIG_FRAME_POINTER vanished from a
fresh x86_64 defconfig, and I doubt I originally explicitly turned
that on when seeding my .config back in the day.

To see if this indeed is a defconfig regression of sorts, I just tried
a `make defconfig; grep FRAME_POINTER .config` for both v4.0 and
master:

v4.0:
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y

master:
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_UNWINDER_FRAME_POINTER is not set

Is this intentional? At a glance, commit 81d3871 looks suspect in
removing ARCH_WANT_FRAME_POINTERS from x86/Kconfig.

Thanks,
Vito Caputo