From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751222AbcDKEyZ (ORCPT ); Mon, 11 Apr 2016 00:54:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:53203 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbcDKEyY (ORCPT ); Mon, 11 Apr 2016 00:54:24 -0400 Message-ID: <1460350461.3870.36.camel@suse.de> Subject: Re: sched: tweak select_idle_sibling to look for idle threads From: Mike Galbraith To: Chris Mason Cc: Peter Zijlstra , Ingo Molnar , Matt Fleming , linux-kernel@vger.kernel.org Date: Mon, 11 Apr 2016 06:54:21 +0200 In-Reply-To: <20160410195543.fp2tpixaafsts5x3@floor.thefacebook.com> References: <20160405180822.tjtyyc3qh4leflfj@floor.thefacebook.com> <20160409190554.honue3gtian2p6vr@floor.thefacebook.com> <1460282661.4251.44.camel@suse.de> <20160410195543.fp2tpixaafsts5x3@floor.thefacebook.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2016-04-10 at 15:55 -0400, Chris Mason wrote: > On Sun, Apr 10, 2016 at 12:04:21PM +0200, Mike Galbraith wrote: > > On Sat, 2016-04-09 at 15:05 -0400, Chris Mason wrote: > > > > > This does preserve the existing logic to prefer idle cores over idle > > > CPU threads, and includes some tests to try and avoid the idle scan when we're > > > actually better off sharing a non-idle CPU with someone else. > > > > My box says the "oh nevermind" checks aren't selective enough, tbench > > dropped 4% at clients=cores, and 2% at clients=threads. > > Ok, I was able to reproduce this by stuffing tbench_srv and tbench onto > just socket 0. Version 2 below fixes things for me, but I'm hoping > someone can suggest a way to get task_hot() buddy checks without the rq > lock. > > I haven't run this on production loads yet, but our 4.0 patch for this > uses task_hot(), so I'd expect it to be on par. If this doesn't fix it > for you, I'll dig up a similar machine on Monday. My box stopped caring. I personally would be reluctant to apply it without a "you asked for it" button or a large pile of benchmark results. Lock banging or not, full scan existing makes me nervous. -Mike