From owner-freebsd-current@freebsd.org Fri Jun 8 12:27:23 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 D1D0F1019E18 for ; Fri, 8 Jun 2018 12:27:22 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49F9F804EE; Fri, 8 Jun 2018 12:27:22 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id n5-v6so3362837wmc.5; Fri, 08 Jun 2018 05:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=PQ59KKZIhyzOMryYyFS2kirF0OXHwtZ4qZsBZPq7CDc=; b=Dgbu5tE0fXy9vkT5vKmSToSzWV1fU32GgTR1mEKzxQgb3eed+SsUmWcZJ0TJ44uFIW 5mxq1kD0u0D58mE9ALivIgohYzeDB/r7MPqVtNpvL3ITzbPvSY4gpAz18CqJpFGQVdgq dXWBXA7mJ/ytM3psvtsv86WIRpeSZ6rm2W4tRDw2vOGh+4Le2RZFq3lXa6x2K2yGJN1b KoL2PNZIkCsMhTwA/sPJ3pi3X/9Id6+ER0kgHYsX8KyV0y7wkUdDnaY9VScgTHYKAOgT lIgqNVdz19Dmj0XSanm1hXiGs/KyUWEZbg+U36PrNY83h+5SxCRw3NkuCxrfTNT8jnfh lYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=PQ59KKZIhyzOMryYyFS2kirF0OXHwtZ4qZsBZPq7CDc=; b=GcMTbNQL5dKmQm6D6dTdkUGEWakKBcnR5RdOAuIBqW6Q/R7I7AaV8KWT1pLTpaYtE4 x2YycdvzX9x+6XzA9icJzTr9eLwaUAhxIEw/GRT+bcXUq2jcOI2DclmMGnoJ1yvEijpm cMxtbRqKrQylxfm0hbA19Xe3w7Ej3l01/9VIkPduPEA4ZDSCHtrrtmfGkRv5fT5H2hk6 9wq4j+XHRTZ3R7rButLildE0Ik8mItXa+Qbyhk/JIZykyD8YSyovjeTRj5wqznC6msS+ Svy8812/qtREyydkRmVGzi58xePwx2o6ftNzWkDcceVky4OQpUS360Uu44nT2o94HTPf UTQw== X-Gm-Message-State: APt69E3rdyBcAFHOxwfFypF6ueb5OLPYL+ec98HTvIv27qWPHfUMhJF4 jBT1Rhk7xkE1tT185ZERHlWr0A== X-Google-Smtp-Source: ADUXVKKcoINLsnx3QbEOkPLare08WwceG8bpiuJm7bMAHOmZD+uCmvIb+ivuV5VfP9PD19O6fmCjig== X-Received: by 2002:a1c:3ac6:: with SMTP id h189-v6mr1575504wma.64.1528460841190; Fri, 08 Jun 2018 05:27:21 -0700 (PDT) Received: from ernst.home (p5B02381D.dip0.t-ipconnect.de. [91.2.56.29]) by smtp.gmail.com with ESMTPSA id 194-v6sm2265974wml.20.2018.06.08.05.27.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 05:27:20 -0700 (PDT) Date: Fri, 8 Jun 2018 14:27:19 +0200 From: Gary Jennejohn To: Andriy Gapon Cc: FreeBSD Current , Stefan Esser , "M. Warner Losh" Subject: Re: Is kern.sched.preempt_thresh=0 a sensible default? Message-ID: <20180608142719.32104c84@ernst.home> In-Reply-To: References: <1d188cb0-ebc8-075f-ed51-57641ede1fd6@freebsd.org> <49fa8de4-e164-0642-4e01-a6188992c32e@freebsd.org> <32d6305b-3d57-4d37-ba1b-51631e994520@FreeBSD.org> <93efc3e1-7ac3-fedc-a71e-66c99f8e8c1e@freebsd.org> <9aaec961-e604-303a-52f3-ee24e3a435d0@FreeBSD.org> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Fri, 08 Jun 2018 12:27:23 -0000 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? -- Gary Jennejohn