Re: FULL_PREEMPTION

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 12 Mar 2013 08:56:37 -0400
On Friday, March 08, 2013 12:58:17 pm Xin Li wrote:
> Hi,
> 
> I have seen a few posts from Andriy as as well as the PC-BSD default
> that for desktop systems, kern.sched.preempt_thresh=224 would improve
> responsiveness.  Looking at the code, it seems that this is equivalent
> to compiling the kernel with FULL_PREEMPTION.
> 
> The sys/conf/NOTES says, however:
> 
> # FULL_PREEMPTION instructs the kernel to preempt non-realtime kernel
> #         threads.  Its sole use is to expose race conditions and other
> #         bugs during development.  Enabling this option will reduce
> #         performance and increase the frequency of kernel panics by
> #         design.  If you aren't sure that you need it then you don't.
> #         Relies on the PREEMPTION option.  DON'T TURN THIS ON.
> 
> Despite the possibility of exposing race conditions as well as
> potentially hurting throughput because of (possibly more) context
> switching, is it considered as a goal that we should support it?  If
> so, should we enable it on -CURRENT?

No, it's only ever intended as a debugging aid.  I suppose we could
consider enabling it in HEAD only just as we do with INVARIANTS, etc.
However, when it was added it was never intended to be used for
production.

-- 
John Baldwin
Received on Tue Mar 12 2013 - 20:11:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:35 UTC