Re: [RFC][PATCH 1/2] sched: Extended scheduler time slice

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

 



On Mon, 10 Feb 2025 22:04:33 +0000
David Laight <david.laight.linux@xxxxxxxxx> wrote:


> My 'gut feel' is that all the context switches with PREEMPT_RT add a significant
> overhead.

"gut feel" is normally not something we care about. You can have a gut feel
to try new code, but it's the benchmarks and measurements that are the only
input for actual decisions.

> It might not matter if your system is lightly loaded (overspecified),
> but if you need to run at 95%+ cpu then they will hit you hard.
> 
> Maybe you can afford to drop softint and napi code to a high(ish) priority
> thread, but I'd have thought that most interrupts should stay that way and
> most spinlocks stay as spinlocks - and probably all disable interrupts!
> Any interrupts that take 'a long time' or spinlocks that are held for 'a long time'
> really need changing anyway.

There's a lot of users of PREEMPT_RT where things work under load. We've
been arguing about those things being changed for a long time (over 20
years), and that hasn't worked out well. The PREEMPT_RT method was used to
fix that. There's just too many places that grab a spin lock and iterate a
list that doesn't have a bound size.

> 
> But there are some really dreadful bits of code in the kernel.
> One of the Intel ethernet drivers spins for ages whenever the bios is accessing
> the hardware - you can't run RTP audio tests on that system.
> 
> Perhaps interrupt disable and pre-emption times should (optionally) be monitored
> and a warning output every time they go up significantly.
> A 'name and shame' policy might improve matters.

We have interrupt and preemption off latency tracers. Note, any
measurements you add can cause noticeable performance hits. They are small,
but still noticeable. Which is why I recommend disabling them on any
production system.

-- Steve




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux