Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1950343imu; Sat, 8 Dec 2018 10:40:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/VjtTuGQs38nuUD5zs3QjHXpRWSFZleN5IFspJnanVHZ3z6LlmFFDfWCfqmRFVTABIyXGdm X-Received: by 2002:a63:4926:: with SMTP id w38mr5625447pga.353.1544294419622; Sat, 08 Dec 2018 10:40:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544294419; cv=none; d=google.com; s=arc-20160816; b=gGp3YngmZ1uSsUGewPA47dlVaA40e8ZpHnc2lPHIQbWTeiKkbvjshte+4yTLqg9H0A y+yr11as3N2bKNlwUGvqDqjFWJ9k62E/itps1Md0abSV8mD0aMl3ooHnopYMahHXTsvb Yvz8qIEEILDcUDJ/wvjeNw9MYd3tXbfLvlMu4mRlJnvjwo18xONLRc8ewswypb7thxUh 9i4o7aOvusaSjU2KMshASdCOnWF/Snvlf401wL+e4P0lJ7vtw6LWZsWH7Fg2EEvAG7Y8 puWYJL/FBoCR+Zo4b6fcKuRAOV4L2wPnPbcnFXT1xTPZrDvRlqHe6jNGXPyZt1tFiW5r VGMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DiieSKPW+n8eGXsurfa3Y/x2+cu9Dhl4vfM7w9GB0WU=; b=UnE89Wae26+Il0IKDvFELN5y1t5s5SHfxfF5zD+EcLdHP/oKrNGrXUHXsj37RctapA bELSnrHQEbqH36FO4B054XGLOWHli1t+eqyWIRDZAgQYMp+MbrBR5iUVfL/9uFba2PwU MFN8o571kVsxUhsQZoZnR40RYYijiO9aoSycjghKqaaXz146WIwo5y4hhaSt66Sb3Tfl 3OQ4v9epGcFx7RbmyrayrL/iU3U7mWMhQHu76tnpfJtDoD00FZacOZ05woUq8FdiCIIo suh2zEZUGLPcJ0Bbd1kKtGR1o/HMwq2XK1I0vLnQBbVHj6fLmiTAGzMf3qJ8p4pvxUwv Zziw== ARC-Authentication-Results: i=1; mx.google.com; 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 97si6153902ple.389.2018.12.08.10.40.03; Sat, 08 Dec 2018 10:40:19 -0800 (PST) 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; 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 S1726202AbeLHSj2 (ORCPT + 99 others); Sat, 8 Dec 2018 13:39:28 -0500 Received: from foss.arm.com ([217.140.101.70]:34248 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbeLHSj2 (ORCPT ); Sat, 8 Dec 2018 13:39:28 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 65FA9EBD; Sat, 8 Dec 2018 10:39:27 -0800 (PST) Received: from [10.0.2.15] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BB5D53F575; Sat, 8 Dec 2018 10:39:24 -0800 (PST) Subject: Re: [PATCH v4 08/10] sched/fair: Steal work from an overloaded CPU when CPU goes idle To: Steven Sistare , mingo@redhat.com, peterz@infradead.org Cc: subhra.mazumdar@oracle.com, dhaval.giani@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, vincent.guittot@linaro.org, quentin.perret@arm.com, linux-kernel@vger.kernel.org References: <1544131696-2888-1-git-send-email-steven.sistare@oracle.com> <1544131696-2888-9-git-send-email-steven.sistare@oracle.com> <9f798c5d-f58a-e1fc-5b03-6598e04916bb@oracle.com> From: Valentin Schneider Message-ID: <3d017a5d-50a4-3e99-c3c8-9b3ee240d076@arm.com> Date: Sat, 8 Dec 2018 18:39:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <9f798c5d-f58a-e1fc-5b03-6598e04916bb@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2018 22:36, Steven Sistare wrote: > On 12/7/2018 3:21 PM, Valentin Schneider wrote: >> Hi Steve, >> >> On 06/12/2018 21:28, Steve Sistare wrote: >> [...] >>> @@ -6778,20 +6791,22 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ >>> update_misfit_status(NULL, rq); >>> >>> /* >>> - * We must set idle_stamp _before_ calling idle_balance(), such that we >>> - * measure the duration of idle_balance() as idle time. >>> + * We must set idle_stamp _before_ calling try_steal() or >>> + * idle_balance(), such that we measure the duration as idle time. >>> */ >>> rq_idle_stamp_update(rq); >> >> idle_balance() has a >> >> /* >> * Do not pull tasks towards !active CPUs... >> */ >> if (!cpu_active(this_cpu)) >> return 0; >> >> check which we probably want for stealing too, so we could hoist it up here >> to cover both idle_balance() and try_steal(). > > try_steal() already checks cpu_active. I could hoist it. > Ah yeah I missed that one, I had only seen cpu_active(src_cpu) in steal_from(). It's all good then. [...]