From owner-freebsd-stable@FreeBSD.ORG Thu Jun 14 12:39:51 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6AEF1065672 for ; Thu, 14 Jun 2012 12:39:51 +0000 (UTC) (envelope-from momchil@xaxo.eu) Received: from vps2.xaxo.eu (vps2.xaxo.eu [78.47.156.66]) by mx1.freebsd.org (Postfix) with ESMTP id 5399C8FC08 for ; Thu, 14 Jun 2012 12:39:50 +0000 (UTC) Received: from t61.xaxo.eu ([10.75.23.6]) by vps2.xaxo.eu (8.14.4/8.14.4) with ESMTP id q5EBdPCd014083; Thu, 14 Jun 2012 13:39:27 +0200 (CEST) (envelope-from momchil@xaxo.eu) Date: Thu, 14 Jun 2012 14:39:16 +0200 Message-ID: <868vfq130r.wl%momchil@xaxo.eu> From: Momchil Ivanov To: Daniel Kalchev In-Reply-To: <4FD8A86B.4010802@digsys.bg> References: <861ulkkflm.wl%momchil@xaxo.eu> <201206121203.q5CC3AA2002709@lurza.secnetix.de> <86zk88isor.wl%momchil@xaxo.eu> <4FD8A86B.4010802@digsys.bg> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-stable@freebsd.org, Momchil Ivanov Subject: Re: ULE Scheduler X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2012 12:39:51 -0000 At Wed, 13 Jun 2012 17:49:15 +0300, Daniel Kalchev wrote: > > > > On 12.06.12 16:08, Momchil Ivanov wrote: > > So the L2 cache is shared between both cores and hence it's size does > > not matter at all? > > If the cache is shared between both cores then it does not matter on > which core the process runs, as long as data is in teh case. The cache > size is irrelevant. > > Some CPUs have shared cache between cores, some don't. The ULE scheduler > takes this into account, the 4BSD does not. Even if the ULE scheduler > takes the CPU topology into consideration, if you only have two cores, > it is almost guaranteed that processes will be switched between both, > because the OS is running way more than two processes "at the same time". > > Even with more cores... it is not guaranteed an computational process > won't be 'bouncing'. Here is an example. > Suppose you have an 8 core (or threads) CPU. If you happen to have an > modern Ethernet controller, like the Intel 82576 (the igb driver in > FreeBSD), then it will use up to 8 interrupt lines, by default routing > them each to a different core. Then, if you have heavier network > traffic, chances are that at any given moment all 8 interrupts might be > fired and all 8 cores switched to service network traffic -- removing > your computational process from the running queue. The next time it > runs, it might run on any other core, especially if the cache is not shared. > > Of course, if you have sufficiently large number of CPUs, you can > configure your system so that such things do not happen, like by > limiting the number of cores the igb driver attaches to, and have some > of the cores dedicated to 'only' running an computational task. > > There is however, very little sense doing so. OK, thank you for the explanation. Regards, Momchil