2024: To summarize the scattered & up-to-date information from multiple threads:
Overview
As of today, there isn't a straightforward identification method since the CPU/process scheduler is an integral part of kernel-space and applying a different one is usually done through a series of .patch files during compilation.
However, this might get easier in 6.12+ with the introduction of user-space schedulers like the sched_ext family (e.g: scx_bpfland, scx_lavd, scx_rusty, scx_rustland, ..) that is injectable during run-time rather than being hard-coded during kernel compilation.
Currently, you might have luck finding clues (at best) in the kernel's .config. Depending on distribution's kernel packaging process and configuration, the run-time config file may reside in different locations and the extraction method varies depending on if it's compressed.
[Reference] Kernel config locations
Most common run-time locations of the kernel config reside in:
/proc/config.gz (if CONFIG_IKCONFIG=m CONFIG_IKCONFIG_PROC=y was used)
/lib/modules/$(uname -r)/build/.config (if INSTALL_MOD_PATH was specified and kernel headers are installed)
/boot/config-$(uname -r) (if distribution packaging processes copies it here)
/boot/config
Alternatively, fetch the source code of distribution's kernel package and look for the config. With DIY distros like Gentoo you'd typically find it here after make menuconfig:
/usr/src/linux/.config
/usr/src/linux-$(uname -r)/.config
[Solution] Inspection of scheduler via kernel config
To get the scheduler settings of a compressed kernel config without explicitly decompressing it:
zgrep "CONFIG_SCHED_" /proc/config.gz
Uncompressed kernel config can be inspected directly with:
grep -E "CONFIG_SCHED_" /lib/modules/$(uname -r)/build/.config
[Example] Identification
For instance, with BORE scheduler you'd see this (relevant line: CONFIG_SCHED_BORE=y):
$ zgrep "CONFIG_SCHED_" /proc/config.gz
CONFIG_SCHED_CORE=y
CONFIG_SCHED_MM_CID=y
CONFIG_SCHED_BORE=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_SCHED_CLUSTER=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
CONFIG_SCHED_MC_PRIO=y
CONFIG_SCHED_HRTICK=y
CONFIG_SCHED_STACK_END_CHECK=y
CONFIG_SCHED_DEBUG=y
CONFIG_SCHED_INFO=y
CONFIG_SCHED_TRACER=y
Some distributions or custom kernel packages might already specify this information in:
$ uname -a
Linux archlinux 6.9.8-273-tkg-bore #1 SMP PREEMPT_DYNAMIC TKG Fri, 12 Jul 2024 19:40:19 +0000 x86_64 GNU/Linux
In summary, if there isn't any indication as to which scheduler is used in kernel's config, it's most likely the upstream default which is EEVDF since 6.6 instead of CFS. To avoid being mislead, check the source code of your distribution's kernel package.