Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp311576pxb; Thu, 12 Nov 2020 04:36:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJybfXCBoo0iFC7mnLMvs5Hg8cj9zI9AILa6146+FsXFzl4JcdmQhBDtRuSewn+jBfxcUBqh X-Received: by 2002:a17:906:1614:: with SMTP id m20mr29555230ejd.258.1605184614632; Thu, 12 Nov 2020 04:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605184614; cv=none; d=google.com; s=arc-20160816; b=ckC41h01hjfQY037BgAL7nG1OrPqA1GcD2c7/Xi9J0/3S/PBI8BbUE5yZz0uxEi+m7 26pizLjo6sE6PYWyUPHPlJ15RzOjh52GSazLRYi3mSa/DBAyh0asIZVjzU3aHn32gyFF ckxv6j6kIoIJkrJTzJdZUhwGPhxUDZyiKusFwOpRFrSxZ0CNd6rbvqsyK03WEVDCAoRe xT92vSPdXyCuc7qz42RVKmkViCq7WIvuk6oJrTMTdwnOY0R+mEvhY7A5maAYqP9jpZ37 sh6Dg3XDyOcxR3Epo5p5jp/Cx8GsvQou+HGLHQaUj4EYux42p0SAwplghil+uEX0dC+Y cFFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KMGQR9b7y1W/CRfsaaWKXTEAM40asGoVK2COn9PUau8=; b=k3lKFFWzNcZGH9gXsmUYoXb0q+NBDUbLb++hEL1RZXTSQZLxonX9P1n2HfwI4GM7VE +P2iZq/oiSQu0f83MoQkEGsVRD3UnA7bo0cm74EUtODJ8KAq/wKvBQkbzlZ4NhEpNMIu jycIZR2cA5kToq431YJqIDfSgWFfcFF0M0AOF43puZa3ijo/meZyfhEQUtPRM9OV+c6C M7ASN5MEfHDWkqlw8bUgfzBYKe7+u6B39R6lIBMQkakPGzJ22itHgrUBEUF+PeDVU75X p06NsN9kDsfmWLmlwPz/Y57NeMq3XqQc9RFrppD61zwIpxWRRfH7WEk8O14d82qLyp4M qTVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn28si3651937ejb.585.2020.11.12.04.36.30; Thu, 12 Nov 2020 04:36:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbgKLMfE (ORCPT + 99 others); Thu, 12 Nov 2020 07:35:04 -0500 Received: from mx2.suse.de ([195.135.220.15]:58314 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbgKLMfD (ORCPT ); Thu, 12 Nov 2020 07:35:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 314A0AC6F; Thu, 12 Nov 2020 12:35:02 +0000 (UTC) Date: Thu, 12 Nov 2020 12:34:58 +0000 From: Mel Gorman To: Vincent Guittot Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, linux-kernel@vger.kernel.org, riel@surriel.com, clm@fb.com, hannes@cmpxchg.org Subject: Re: [PATCH] sched/fair: ensure tasks spreading in LLC during LB Message-ID: <20201112123458.GY3306@suse.de> References: <20201102102457.28808-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201102102457.28808-1-vincent.guittot@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 11:24:57AM +0100, Vincent Guittot wrote: > schbench shows latency increase for 95 percentile above since: > commit 0b0695f2b34a ("sched/fair: Rework load_balance()") > > Align the behavior of the load balancer with the wake up path, which tries > to select an idle CPU which belongs to the LLC for a waking task. > > calculate_imbalance() will use nr_running instead of the spare > capacity when CPUs share resources (ie cache) at the domain level. This > will ensure a better spread of tasks on idle CPUs. > > Running schbench on a hikey (8cores arm64) shows the problem: > > tip/sched/core : > schbench -m 2 -t 4 -s 10000 -c 1000000 -r 10 > Latency percentiles (usec) > 50.0th: 33 > 75.0th: 45 > 90.0th: 51 > 95.0th: 4152 > *99.0th: 14288 > 99.5th: 14288 > 99.9th: 14288 > min=0, max=14276 > > tip/sched/core + patch : > schbench -m 2 -t 4 -s 10000 -c 1000000 -r 10 > Latency percentiles (usec) > 50.0th: 34 > 75.0th: 47 > 90.0th: 52 > 95.0th: 78 > *99.0th: 94 > 99.5th: 94 > 99.9th: 94 > min=0, max=94 > > Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()") > Reported-by: Chris Mason > Suggested-by: Rik van Riel > Signed-off-by: Vincent Guittot Acked-by: Mel Gorman -- Mel Gorman SUSE Labs