From owner-freebsd-current@freebsd.org Fri Jun 8 14:40:37 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 E9552101C8E4 for ; Fri, 8 Jun 2018 14:40:36 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 5CB5D85288; Fri, 8 Jun 2018 14:40:36 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x242.google.com with SMTP id v13-v6so13649543wrp.13; Fri, 08 Jun 2018 07:40:36 -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=4/Z8GVljJFFLKgeXceBL6UHcaCFM/LsC2m96dyfhpIs=; b=q3iMod3XJVAS/COr4do2pRtbfKAB+BHvLj3hoi5ifz3yH15Q0MwlwH/YKaaIaPZF7s ItnOSTxpBQ1X6+Cy4IpeFDEmFUUcGjR5lxYpFBrj0nqJP2CSnnmKS8h7SXD0gyGmWWe8 B5ZFSSUdXgeD7Ejali5nC1U4KeWj60UjLE5o/o4+mXg6VYoty4UjeIoaxH5YY+uz67DZ WB6JNJ+3i7wbaxX5NjVylEF/HhN3sKaiixE0k1jY1yNBoj3DdLMAC6eoy+ranDVriYHn KWQ2SuldcYhniJvKHWXyVmHje1+MN2CSJu9L6ip3NZBhfCF/z6mr11E0qjiYw9bYfJz7 EYWA== 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=4/Z8GVljJFFLKgeXceBL6UHcaCFM/LsC2m96dyfhpIs=; b=Lrun7apkfCclSSZKu+vLH/8U+Oy1ni0WokK5goreBHv7qI4o5tvrwpNeKWabPtCm+F rwJhu+Xjvw5VdVhIuRAKu+YI/4vrdLZ45WanaA7vJjLAks9ivz87jO+MspvNps8pBWMs blkuDRMcs6q2p+PIUQmjmVL8oTDb+d9virJf55MuZY3swPEUzzOngCFTZLudULswKnLb F1xCmYrwKOlBbO3Ja3WQQmAfpB2P86hAcpSPYDJQY943TtvGYIPypwBzDyABxVJdqutq KcqMM1PhiQ7endZab5H5sQwKyaMvMhfP6oWEFTNWDzRm9k9UVuEbflHLQftK9/8T+Dar XR4g== X-Gm-Message-State: APt69E2qifFVlcbqZ1//MQQj2ND8IX9Peqf+6Iz5YWb2kHe/OCRI5qTy Vf2KUwtExpOe8wK6rfWSwJSsEQ== X-Google-Smtp-Source: ADUXVKLA6/vPZb47sDmoOU1l0WjfkRocQJRNkTusVjkecsE8yAbSGqT1/sL3Y/MZJXOzCLbBFlJhXA== X-Received: by 2002:adf:ea0f:: with SMTP id q15-v6mr5736303wrm.9.1528468835254; Fri, 08 Jun 2018 07:40:35 -0700 (PDT) Received: from ernst.home (p5B02381D.dip0.t-ipconnect.de. [91.2.56.29]) by smtp.gmail.com with ESMTPSA id l84-v6sm2318824wmi.3.2018.06.08.07.40.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 07:40:34 -0700 (PDT) Date: Fri, 8 Jun 2018 16:40:33 +0200 From: Gary Jennejohn To: Andriy Gapon Cc: FreeBSD Current Subject: Re: Is kern.sched.preempt_thresh=0 a sensible default? Message-ID: <20180608164033.5ff948f9@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> <20180608142719.32104c84@ernst.home> 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 14:40:37 -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. -- Gary Jennejohn