[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CONFIG_PREEMPT_DYNAMIC=y?



On Tuesday, 10 October 2023 12:10:07 CEST Emanuele Rocca wrote:
> CONFIG_PREEMPT_DYNAMIC is set to 'y' by default on amd64 due to
> HAVE_PREEMPT_DYNAMIC_CALL being 'y', see:
> https://sources.debian.org/src/linux/6.5.6-1/kernel/Kconfig.preempt/?hl=101#
> L101
> 
> arm64 does not have PREEMPT_DYNAMIC_CALL, this is why PREEMPT_DYNAMIC is
> not set by default there.

Neither does amd64. So it appears something else is causing 
CONFIG_PREEMPT_DYNAMIC to be enabled on amd64.

On Sunday, 8 October 2023 19:17:58 CEST Diederik de Haas wrote:
> In the Debian kernel it's not explicitly enabled and it's having a different
> effect on amd64 compared to arm64.

I think it should be explicitly enabled (or disabled) and not be it dependent
on some other, possibly unrelated, Kconfig option being enabled

me@pc:~/dev/debian/salsa/kernel-team/linux$ grep -rn PREEMPT debian/config/
debian/config/config:6446:# CONFIG_PREEMPT_NONE is not set
debian/config/config:6447:CONFIG_PREEMPT_VOLUNTARY=y
debian/config/config:6448:# CONFIG_PREEMPT is not set
debian/config/config:6554:# CONFIG_PREEMPT_TRACER is not set
debian/config/config:6633:CONFIG_DEBUG_PREEMPT=y
debian/config/featureset-rt/config:5:# CONFIG_PREEMPT_VOLUNTARY is not set
debian/config/featureset-rt/config:6:CONFIG_PREEMPT_RT=y
debian/config/featureset-rt/defines:5:part-long-rt: This kernel includes the PREEMPT_RT realtime patch set.
debian/config/featureset-rt/defines:6:part-short-rt: PREEMPT_RT
debian/config/kernelarch-mips/config.loongson-3:110:# CONFIG_PREEMPT_VOLUNTARY is not set
debian/config/kernelarch-mips/config.loongson-3:111:CONFIG_PREEMPT=y

In commit 89b4f0559d598f5b61ad26fe12d787c21b1aea61 (dd 2009-09-25) 
CONFIG_PREEMPT_VOLUNTARY was enabled and its Kconfig entry mentions this:
"Select this if you are building a kernel for a desktop system."

The PREEMPT_DYNAMIC (and related options) are NOT en-/disabled explicitly.
The PREEMPT_DYNAMIC Kconfig entry mentions the following:
1. "This option allows to define the preemption model on the kernel command
line parameter and thus override the default preemption model"
2. "The feature is primarily interesting for Linux distributions"
3. "Interesting if you want the same pre-built kernel should be used for
both Server and Desktop workloads."

ad 1) I _think_ running benchmarks is not that useful as its result will/should
vary based on the default preemption model and whether that is overridden
on the kernel command line
ad 3) It seems (to me) that it is a better choice then PREEMPT_VOLUNTARY for
Debian as it's used both as Server and Desktop, on various architectures.

I think https://bugs.debian.org/1016151#15 means that PREEMPT_DYNAMIC 
should be enabled, it just hasn't been made explicit in Debian's kernel config.

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: