From owner-freebsd-current@FreeBSD.ORG Tue Mar 12 21:11:58 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE35C8AD; Tue, 12 Mar 2013 21:11:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B8A35850; Tue, 12 Mar 2013 21:11:58 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1872FB917; Tue, 12 Mar 2013 17:11:58 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org, d@delphij.net Subject: Re: FULL_PREEMPTION Date: Tue, 12 Mar 2013 08:56:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <513A26B9.7060305@delphij.net> In-Reply-To: <513A26B9.7060305@delphij.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201303120856.37443.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 12 Mar 2013 17:11:58 -0400 (EDT) Cc: Andriy Gapon X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2013 21:11:58 -0000 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