From owner-freebsd-current@freebsd.org Sat Jun 9 17:16:16 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80B5E10118AC for ; Sat, 9 Jun 2018 17:16:16 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC8280FAD; Sat, 9 Jun 2018 12:36:57 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w59Catua019021; Sat, 9 Jun 2018 05:36:55 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w59CatKw019020; Sat, 9 Jun 2018 05:36:55 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201806091236.w59CatKw019020@pdx.rh.CN85.dnsmgr.net> Subject: Re: Is kern.sched.preempt_thresh=0 a sensible default? In-Reply-To: <20180608164033.5ff948f9@ernst.home> To: gljennjohn@gmail.com Date: Sat, 9 Jun 2018 05:36:55 -0700 (PDT) CC: Andriy Gapon , FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 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: Sat, 09 Jun 2018 17:16:16 -0000 > On Fri, 8 Jun 2018 17:18:43 +0300 > Andriy Gapon wrote: > > > On 08/06/2018 15:27, Gary Jennejohn wrote: > > > On Thu, 7 Jun 2018 20:14:10 +0300 > > > Andriy Gapon wrote: > > > > > >> On 03/05/2018 12:41, Andriy Gapon wrote: > > >>> I think that we need preemption policies that might not be expressible as one or > > >>> two numbers. A policy could be something like this: > > >>> - interrupt threads can preempt only threads from "lower" classes: real-time, > > >>> kernel, timeshare, idle; > > >>> - interrupt threads cannot preempt other interrupt threads > > >>> - real-time threads can preempt other real-time threads and threads from "lower" > > >>> classes: kernel, timeshare, idle > > >>> - kernel threads can preempt only threads from lower classes: timeshare, idle > > >>> - interactive timeshare threads can only preempt batch and idle threads > > >>> - batch threads can only preempt idle threads > > >> > > >> > > >> Here is a sketch of the idea: https://reviews.freebsd.org/D15693 > > >> > > > > > > What about SCHED_4BSD? Or is this just an example and you chose > > > SCHED_ULE for it? > > > > I haven't looked at SCHED_4BSD code at all. > > > > I hope you will eventually because that's what I use. I find its > scheduling of interactive processes much better than ULE. +1 Bruce Evans may have some info and/or changes here too. -- Rod Grimes rgrimes@freebsd.org