From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 9 12:01:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58B6816A4CE; Tue, 9 Mar 2004 12:01:44 -0800 (PST) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 753E643D2D; Tue, 9 Mar 2004 12:01:42 -0800 (PST) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (unknown [198.147.128.71]) by smtp-relay.omnis.com (Postfix) with ESMTP id C67D81880A23; Tue, 9 Mar 2004 12:01:40 -0800 (PST) From: Wes Peters Organization: Softweyr.com To: Robert Watson , Bin Ren Date: Tue, 9 Mar 2004 12:01:23 -0800 User-Agent: KMail/1.5.4 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403091201.23665.wes@softweyr.com> cc: freebsd-hackers@freebsd.org Subject: Re: a serious error in sched_ule.c? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 20:01:44 -0000 On Tuesday 09 March 2004 08:41 am, Robert Watson wrote: > On 9 Mar 2004, Bin Ren wrote: > > > > I've been reading sched_ule.c and seem to find a serious error: > > > > in 'sched_slice()': > > > > * Rationale: > > * KSEs in interactive ksegs get the minimum slice so that we > > * quickly notice if it abuses its advantage. > > ..... > > #define SCHED_SLICE_INTERACTIVE (slice_max) > > > > (slice_max) for interactive KSEs???? Either this is a serious mistake > > or I'm seriously missing sth here. > > I believe this is a synchronization error in the comment and the code. > The code was changed to provide a maximum slice to interactive > applications because non-CPU intensive X11 applications will be marked as > interactive, but redraws get interrupted in a short slice. When the > change went in to increase the time slice I saw an observable improvement > in the redraws of X11 apps under load. One of the classic trade-offs in making a 'server' vs. 'workstation' operating system. Workstations require a strong preference for interactive over background tasks so the interactive tasks will remain responsive, especially in terms of heavily event-driven tasks like graphical UIs. For a true server, where interactive tasks are not the norm, this preference may be counter-productive. Is there some way (boot hint?) we could change SCHED_SLICE_INTERACTIVE between slice_max and something approaching slice_min? -- "Where am I, and what am I doing in this handbasket?" Wes Peters wes@softweyr.com