KernelTrap: Kernel Preemption, To Enable Or Not To Enable

Written By
Web Webster
Web Webster
Mar 24, 2004

[ Thanks to Jeremy
Andrews
for this link. ]

“A recent bug report on the lkml complained of significant
performance degradation from enabling CONFIG_PREEMPT, kernel
preemption. 2.6 kernel maintainer Andrew Morton pointed out that
such degradation from enabling kernel preemption is not normal,
instead likely from it triggering a bug. However, an interesting
conversation on the merits of kernel preemption followed.

“Andrea Arcangeli, author of the 2.4 virtual memory subsystem,
bluntly suggested, ‘keep preempt turned off always, it’s useless.
Preempt just wastes cpu with tons of branches in fast paths that
should take one cycle instead.’ Andrew Morton noted, ‘preempt is
overrated.’ However, he went on to point out that kernel preemption
has been very useful in detecting locking bugs. He added, ‘it has
been demonstrated that preempt improves the average latency. But
not worst-case, because those paths tend to be under
spinlock…'”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.