Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2462838ima; Mon, 22 Oct 2018 10:08:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV61mj2LeamDduOb+5WcAzfK5b+z735mH672KZDQtJRh4getIw/cMUcYJXpdU1xD4K1ToyBLt X-Received: by 2002:a63:4e18:: with SMTP id c24-v6mr38772275pgb.6.1540228097824; Mon, 22 Oct 2018 10:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540228097; cv=none; d=google.com; s=arc-20160816; b=m+tftNZdoS/JMe0gctP/zsfoertTt/tL8S0JWW3V2BESbSxkO1QqjP8cCPcDVogCxe wbU0x6eA5i+GnGeXK2DpLStYP73+VwDWjI0f3TP5y9G8knh8HC0M0IN0OaRuNI+g27bA +yanB2HhVAxD7Muq1tgajJH+9A81jI2neobwxaa3RMBVD2ZQD7aWgygdELwm02n6SIkx D+5jrMK9TXoCeC0NoiheNJE1vNlLO/IfksUYPZOBAIhxHhBzPpILpOAiWQJlbmoLN2TB d/LA+4woC6V9aDqPjGLFzAZJ0Y2rN7lHFUawx50UEcEQlPZ4w7RXt3btSO0dxnzFsyvU 5D5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=S0F8arwKqXQNGkiDMFahm93nEr2LHsle6EZ0rDIQgNs=; b=z5W75VjdENgFwBoUH0pgwHs2svQt1N7A+snRPelkb3RiFZYdpHN9L/YBGlcYhRku8E 4PMWpzNYWcBn9qL5GGkP1tydAYbvPj2X+MR6rL+2RNrBGUOOzZ6dn1Tal86jDXqVI84O vTn1m6U6ICSXg4kdWkL6LXaxGwTTpdcunhdLZwITmLLn20G2Z787SCkUjMkJ/8ETtSiq JgbRdQQEOo3OiLAMGx59TuBEKoxtTs4LfpcNR3IDJNsSWYNtXWntQgH7sfFjoDHlLHRD NkE3gvhI3IPwNDlfDqk6UsYP2vbm/8syygFXjCBaiBqFPR76KhCzv6+NstpOsHRgswJ7 FJ/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Os75sa5I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si36182899pfw.261.2018.10.22.10.08.00; Mon, 22 Oct 2018 10:08:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Os75sa5I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728656AbeJWB0T (ORCPT + 99 others); Mon, 22 Oct 2018 21:26:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43260 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbeJWB0T (ORCPT ); Mon, 22 Oct 2018 21:26:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=S0F8arwKqXQNGkiDMFahm93nEr2LHsle6EZ0rDIQgNs=; b=Os75sa5IwZ8LLx2BiLKAumUpG 4O4kmQXo1UYTYaOPflZl2dtQ/UgWpwM/xEMmO0zhoDw2HBiDL93HD2BnGFMHsIFqHV0cBAQVRJmre ngnSmT+ejb0tM4tuRGAV1UlSOH4A8QRWATkGpUOAst05BTAbquC38hg+imyBOQ1n6ZOOILyBjFNyK e1HBr9HyntwUBWSeLQCBhODcwwwmr/TItmIU4uaVVZvlfujv7s4tiAVHtDgOVf2n1fVFA6I70DqBP Gj3hjY1pOf4WM9I6Z6fgPVnVcF/gjQCtJZoiymqeW6xOb0DAPiGlVsHOlpnstjPYDCP09/Kpgsxt3 1qkt1ey6Q==; Received: from [167.98.65.38] (helo=worktop) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gEdfK-00014S-Lk; Mon, 22 Oct 2018 17:06:54 +0000 Received: by worktop (Postfix, from userid 1000) id 483CF6E0A21; Mon, 22 Oct 2018 19:04:21 +0200 (CEST) Date: Mon, 22 Oct 2018 19:04:21 +0200 From: Peter Zijlstra To: Steve Sistare Cc: mingo@redhat.com, subhra.mazumdar@oracle.com, dhaval.giani@oracle.com, rohit.k.jain@oracle.com, daniel.m.jordan@oracle.com, pavel.tatashin@microsoft.com, matt@codeblueprint.co.uk, umgwanakikbuti@gmail.com, riel@redhat.com, jbacik@fb.com, juri.lelli@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/10] steal tasks to improve CPU utilization Message-ID: <20181022170421.GF3117@worktop.programming.kicks-ass.net> References: <1540220381-424433-1-git-send-email-steven.sistare@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1540220381-424433-1-git-send-email-steven.sistare@oracle.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 22, 2018 at 07:59:31AM -0700, Steve Sistare wrote: > When a CPU has no more CFS tasks to run, and idle_balance() fails to > find a task, then attempt to steal a task from an overloaded CPU in the > same LLC. Maintain and use a bitmap of overloaded CPUs to efficiently > identify candidates. To minimize search time, steal the first migratable > task that is found when the bitmap is traversed. For fairness, search > for migratable tasks on an overloaded CPU in order of next to run. > > This simple stealing yields a higher CPU utilization than idle_balance() > alone, because the search is cheap, so it may be called every time the CPU > is about to go idle. idle_balance() does more work because it searches > widely for the busiest queue, so to limit its CPU consumption, it declines > to search if the system is too busy. Simple stealing does not offload the > globally busiest queue, but it is much better than running nothing at all. Why I don't dislike the idea; I feel it is unfortunate to have two different mechanisms to do effectively the same thing. Can't we improve idle_balance() instead of building this parallel functionality?