Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756126AbXHKFnt (ORCPT ); Sat, 11 Aug 2007 01:43:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751622AbXHKFnj (ORCPT ); Sat, 11 Aug 2007 01:43:39 -0400 Received: from 1wt.eu ([62.212.114.60]:1316 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbXHKFni (ORCPT ); Sat, 11 Aug 2007 01:43:38 -0400 Date: Sat, 11 Aug 2007 07:28:40 +0200 From: Willy Tarreau To: Roman Zippel Cc: Ingo Molnar , Michael Chang , Linus Torvalds , Andi Kleen , Mike Galbraith , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: CFS review Message-ID: <20070811052840.GB24082@1wt.eu> References: <20070801190556.GA1199@elte.hu> <20070810054948.GA5908@elte.hu> <20070810194705.GH6002@1wt.eu> <20070810213630.GA13910@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 11, 2007 at 12:50:08AM +0200, Roman Zippel wrote: > Hi, > > On Fri, 10 Aug 2007, Ingo Molnar wrote: > > > achieve that. It probably wont make a real difference, but it's really > > easy for you to send and it's still very useful when one tries to > > eliminate possibilities and when one wants to concentrate on the > > remaining possibilities alone. > > The thing I'm afraid about CFS is its possible unpredictability, which > would make it hard to reproduce problems and we may end up with users with > unexplainable weird problems. That's the main reason I'm trying so hard to > push for a design discussion. You may be interested by looking at the very early CFS versions. The design was much more naive and understandable. After that, a lot of tricks have been added to take into account a lot of uses and corner cases, which may not help in understanding it globally. > Just to give an idea here are two more examples of irregular behaviour, > which are hopefully easier to reproduce. > > 1. Two simple busy loops, one of them is reniced to 15, according to my > calculations the reniced task should get about 3.4% (1/(1.25^15+1)), but I > get this: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 4433 roman 20 0 1532 300 244 R 99.2 0.2 5:05.51 l > 4434 roman 35 15 1532 72 16 R 0.7 0.1 0:10.62 l Could this be caused by typos in some tables like you have found in wmult ? > OTOH upto nice level 12 I get what I expect. > > 2. If I start 20 busy loops, initially I see in top that every task gets > 5% and time increments equally (as it should): (...) > But if I renice all of them to -15, the time every task gets is rather > random: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 4492 roman 5 -15 1532 68 16 R 1.0 0.1 0:07.95 l > 4491 roman 5 -15 1532 68 16 R 4.3 0.1 0:07.62 l > 4490 roman 5 -15 1532 68 16 R 3.3 0.1 0:07.50 l > 4489 roman 5 -15 1532 68 16 R 7.6 0.1 0:07.80 l > 4488 roman 5 -15 1532 68 16 R 9.6 0.1 0:08.31 l > 4487 roman 5 -15 1532 68 16 R 3.3 0.1 0:07.59 l > 4486 roman 5 -15 1532 68 16 R 6.6 0.1 0:07.08 l > 4485 roman 5 -15 1532 68 16 R 10.0 0.1 0:07.31 l > 4484 roman 5 -15 1532 68 16 R 8.0 0.1 0:07.30 l > 4483 roman 5 -15 1532 68 16 R 7.0 0.1 0:07.34 l > 4482 roman 5 -15 1532 68 16 R 1.0 0.1 0:05.84 l > 4481 roman 5 -15 1532 68 16 R 1.0 0.1 0:07.16 l > 4480 roman 5 -15 1532 68 16 R 3.3 0.1 0:07.00 l > 4479 roman 5 -15 1532 68 16 R 1.0 0.1 0:06.66 l > 4478 roman 5 -15 1532 68 16 R 8.6 0.1 0:06.96 l > 4477 roman 5 -15 1532 68 16 R 8.6 0.1 0:07.63 l > 4476 roman 5 -15 1532 68 16 R 9.6 0.1 0:07.38 l > 4475 roman 5 -15 1532 68 16 R 1.3 0.1 0:07.09 l > 4474 roman 5 -15 1532 68 16 R 2.3 0.1 0:07.97 l > 4473 roman 5 -15 1532 296 244 R 1.0 0.2 0:07.73 l Do you see this only at -15, or starting with -15 and below ? Willy