From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 6 10:39:37 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD9A7106564A for ; Mon, 6 Feb 2012 10:39:37 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1A08FC0A for ; Mon, 6 Feb 2012 10:39:37 +0000 (UTC) Received: by eekb47 with SMTP id b47so2525188eek.13 for ; Mon, 06 Feb 2012 02:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; bh=HT29Xf+NUhLXXLfzt47PFWUZnMYHeUPM5y3C7KePW9I=; b=AGTXQP0Ukzr8ZTIF2ilEpp8oLOSMoSlpjHFW+mdDIlWtSV89pp5BBMJsiKJHcGu4Cp V7Qtx/kGa6HvdHdVCercsP1VaQNcYSEeqreoDrG2zmsmSCBovJ+h1xYmxJq3Qq1AneWm obnVYFRWKAVkJdAmRW3FWeTlj3jMOH9J9IqVk= Received: by 10.14.194.134 with SMTP id m6mr5440681een.4.1328522964971; Mon, 06 Feb 2012 02:09:24 -0800 (PST) Received: from ernst.jennejohn.org (p578E2230.dip.t-dialin.net. [87.142.34.48]) by mx.google.com with ESMTPS id n17sm59407912eei.3.2012.02.06.02.09.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Feb 2012 02:09:24 -0800 (PST) Date: Mon, 6 Feb 2012 11:09:21 +0100 From: Gary Jennejohn To: Alexander Motin Message-ID: <20120206110921.23741ee5@ernst.jennejohn.org> In-Reply-To: <4F2F7B7F.40508@FreeBSD.org> References: <4F2F7B7F.40508@FreeBSD.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [RFT][patch] Scheduling for HTT and not only X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2012 10:39:37 -0000 On Mon, 06 Feb 2012 09:04:31 +0200 Alexander Motin wrote: > I've analyzed scheduler behavior and think found the problem with HTT. > SCHED_ULE knows about HTT and when doing load balancing once a second, > it does right things. Unluckily, if some other thread gets in the way, > process can be easily pushed out to another CPU, where it will stay for > another second because of CPU affinity, possibly sharing physical core > with something else without need. > > I've made a patch, reworking SCHED_ULE affinity code, to fix that: > http://people.freebsd.org/~mav/sched.htt.patch > 10.0-CURRENT FreeBSD r231026M: Mon Feb 6 10:40:10 CET 2012 amd64 CPU: AMD Phenom(tm) II X6 1090T Processor (3214.71-MHz K8-class CPU) This patch seems pretty good. Previously I was using SCHED_4BSD. My simple test was "make -j6 buildworld" while loading web pages at the same time and observing the CPU core loading using gkrellm. In general the loads seemed to be more evenly distributed than without the patch. With the old ULE CPU0 seemed to be underutilized, now it's an equal partner. Web pages also loaded quite quickly despite the high load on the cores. I did notice some mouse pointer lag, but it was quite minor. The buildworld time also seemed to be pretty much the same as with 4BSD. Seems like a good start on improving ULE. -- Gary Jennejohn