From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 3 09:00:00 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 1B7A01065670; Sat, 3 Mar 2012 09:00:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 686A58FC0A; Sat, 3 Mar 2012 08:59:59 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so2073948wgb.31 for ; Sat, 03 Mar 2012 00:59:58 -0800 (PST) Received-SPF: pass (google.com: domain of adrian.chadd@gmail.com designates 10.180.85.69 as permitted sender) client-ip=10.180.85.69; Authentication-Results: mr.google.com; spf=pass (google.com: domain of adrian.chadd@gmail.com designates 10.180.85.69 as permitted sender) smtp.mail=adrian.chadd@gmail.com; dkim=pass header.i=adrian.chadd@gmail.com Received: from mr.google.com ([10.180.85.69]) by 10.180.85.69 with SMTP id f5mr2765339wiz.18.1330765198443 (num_hops = 1); Sat, 03 Mar 2012 00:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=tElgKNE4o+3HQs3XpRLZv7AxtTOcqdDJdoJx5ZvOklo=; b=riQkKegIiW5eibchPWLUPb2qs0UhVqpdc1J19cbKWcvROX7jF8L960y3CeRGNBoke5 GO/FQNB9FmUkBH+HVMmbfjw8WrTJY+5+vUN+4Fx0byLmWVdCMua23PK1197FuJOUlwNd HTiLKV9V68budI1F/EuOWaMkasJywl5mzQxWKp7d7hGeK3daJ52juJvqTgCApiDcSOrO XIkxmqHxWr9pnC9KEZn7ieL6dDF2acAv1M6fM7R2a+rkK1zo2KCQ/j8ZepJNzHi5xt6G OCC+yuffJi4QPXPleIP6Ipth01qry57eKo62y/ZTjMaUvVdlb5ZtWV9Ll3Op8sXRBHg3 4CCQ== MIME-Version: 1.0 Received: by 10.180.85.69 with SMTP id f5mr2181360wiz.18.1330765198157; Sat, 03 Mar 2012 00:59:58 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.198.81 with HTTP; Sat, 3 Mar 2012 00:59:58 -0800 (PST) In-Reply-To: <4F51CAE9.20905@FreeBSD.org> References: <4F2F7B7F.40508@FreeBSD.org> <4F366E8F.9060207@FreeBSD.org> <4F367965.6000602@FreeBSD.org> <4F396B24.5090602@FreeBSD.org> <4F3978BC.6090608@FreeBSD.org> <4F3990EA.1080002@FreeBSD.org> <4F3C0BB9.6050101@FreeBSD.org> <4F3E807A.60103@FreeBSD.org> <4F3E8858.4000001@FreeBSD.org> <4F4ACF2C.50300@m5p.com> <4F4B67AB.40907@m5p.com> <4F4C17E2.2040101@m5p.com> <4F516281.30603@m5p.com> <4F51CAE9.20905@FreeBSD.org> Date: Sat, 3 Mar 2012 00:59:58 -0800 X-Google-Sender-Auth: 0VON1pvO_7jcguG-de_fuybxamU Message-ID: From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, George Mitchell Subject: Re: [RFT][patch] Scheduling for HTT and not only X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2012 09:00:00 -0000 Right. Is this written up in a PR somewhere explaining the problem in as much depth has you just have? And thanks for this, it's great to see some further explanation of the current issues the scheduler faces. Adrian On 2 March 2012 23:40, Alexander Motin wrote: > Hi. > > > On 03/03/12 05:24, Adrian Chadd wrote: >> >> mav@, can you please take a look at George's traces and see if there's >> anything obviously silly going on? >> He's reporting that your ULE work hasn't improved his (very) degenerate >> case. > > > As I can see, my patch has nothing to do with the problem. My patch impro= ves > SMP load balancing, while in this case problem is different. In some case= s, > when not all CPUs are busy, my patch could mask the problem by using more > CPUs, but not in this case when dnets consumes all available CPUs. > > I still not feel very comfortable with ULE math, but as I understand, in > both illustrated cases there is a conflict between clearly CPU-bound dnet= s > threads, that consume all available CPU and never do voluntary context > switches, and more or less interactive other threads. If other threads > detected to be "interactive" in ULE terms, they should preempt dnets thre= ads > and everything will be fine. But "batch" (in ULE terms) threads never > preempt each other, switching context only about 10 times per second, as > hardcoded in sched_slice variable. Kernel build by definition consumes to= o > much CPU time to be marked "interactive". exo-helper-1 thread in > interact.out could potentially be marked "interactive", but possibly once= it > consumed some CPU to become "batch", it is difficult for it to get back, = as > waiting in a runq is not counted as sleep and each time it is getting > running, it has some new work to do, so it remains "batch". May be if CPU > time accounting was more precise it would work better (by accounting thos= e > short periods when threads really sleeps voluntary), but not with present > sampled logic with 1ms granularity. As result, while dnets threads each t= ime > consume full 100ms time slices, other threads are starving, getting runni= ng > only 10 times per second to voluntary switch out in just a few millisecon= ds. > > >> On 2 March 2012 16:14, George Mitchell =A0wrote: >>> >>> On 03/02/12 18:06, Adrian Chadd wrote: >>>> >>>> >>>> Hi George, >>>> >>>> Have you thought about providing schedgraph traces with your >>>> particular workload? >>>> >>>> I'm sure that'll help out the scheduler hackers quite a bit. >>>> >>>> THanks, >>>> >>>> >>>> Adrian >>>> >>> >>> I posted a couple back in December but I haven't created any more >>> recently: >>> >>> http://www.m5p.com/~george/ktr-ule-problem.out >>> http://www.m5p.com/~george/ktr-ule-interact.out >>> >>> To the best of my knowledge, no one ever examined them. =A0 -- George > > > > -- > Alexander Motin > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= "