From owner-freebsd-current@freebsd.org Fri Jun 8 14:18:53 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 C0B8C101BBBE for ; Fri, 8 Jun 2018 14:18:53 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (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 2DD1D83B19 for ; Fri, 8 Jun 2018 14:18:53 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f68.google.com with SMTP id d24-v6so20311373lfa.8 for ; Fri, 08 Jun 2018 07:18:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SREXyr2kXPON1OW7BWYZJ3vovP/HhduZRTHoac9zSpM=; b=hzVyNGiyaMap1RTBLiYR2rVppjlsYww/oIgMphkvFuB/U5kxPjF1nocyFZ7QfzHtNp nTuRvNxOpt0sc1NBDEhAfY2OkLuSxzBCbN1kY/efbE/FRl1eku00IYrEch7/C+mqrU9u MMY7c+CFzVe3ylauxC9BC7/0nFfqv3Fla1TQy32+aXd2Rd9Wd/BLlP50dpXx+mrKTNqn D5mFn1stdned0xP5FbNDb1NNsa8qGyze6qBRizzCZJfRpDf6k9J4mawKJdkRP4apZCD1 bgzDREB1Rpg4YEvO25XnjefatumDSgdWeNSS0dg7njd7N5WdrP1ZYN19dTbp8IrVuGdw Txuw== X-Gm-Message-State: APt69E3Cmy0okgj3nyjgHmnUNygQJ3pmxDenAzqDfL2msdda/Cp7UMet de6PdwBe1F9kJw8AfPj2rsY/Xo9A X-Google-Smtp-Source: ADUXVKKwjW0k1mI7sQL1yjiXgnVZgmeMp2pfiFoMVkBfb/H9RWRGsVKvEXBL4TKLRa6zZvBSW7y2eA== X-Received: by 2002:a19:944f:: with SMTP id w76-v6mr4279274lfd.90.1528467525453; Fri, 08 Jun 2018 07:18:45 -0700 (PDT) Received: from [10.141.167.20] ([130.180.212.184]) by smtp.googlemail.com with ESMTPSA id j11-v6sm4344866lja.42.2018.06.08.07.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jun 2018 07:18:44 -0700 (PDT) Subject: Re: Is kern.sched.preempt_thresh=0 a sensible default? To: gljennjohn@gmail.com Cc: FreeBSD Current 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> <20180608142719.32104c84@ernst.home> From: Andriy Gapon Openpgp: preference=signencrypt Message-ID: Date: Fri, 8 Jun 2018 17:18:43 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180608142719.32104c84@ernst.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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 14:18:53 -0000 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. -- Andriy Gapon