Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp538422ima; Fri, 1 Feb 2019 07:08:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN7oykDfzFrDpBPFsB6QX+GKhItnqd0Kx8WrEd+jmr9J578csCVxU8tVZFNmYK197r90m5GI X-Received: by 2002:a17:902:f082:: with SMTP id go2mr39980036plb.115.1549033728249; Fri, 01 Feb 2019 07:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549033728; cv=none; d=google.com; s=arc-20160816; b=nY+u6X11u3wQNEKXPwetkP4xPAvqKMWZA2XXr9B5nBKspqroaUgHMDUbyjSEZGrOYG d4PsJtwwfqLgkHgx/Nl7s2PifCyrKZMKDuVvWPBPEIuK4E6zUOzB/ez6jmoxp8VGS4m+ qo82+o0LZ/qzzhd5v0ZblFtlH32qbSzY5GqlLSHr9X266bqgO5BpsVlibxIgVw3b6F/D oCq6gx4FfvFLJ51i+CBpQqEduRcFFz+6IMb0WFGt4rl4K+YORROmej0ir/NVu4O5TWPZ 8rcNSFfQbnyy5Qvm0LgTHlvqPhR0BadI5kzyqYeCbY4CKB3niozS/GMrV8vptqDEkdhj OeAg== 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:references:cc:to:from:subject; bh=aJKSjzLIxwx8gmn1tjOWT8/8DbWXqjoLcUPWLcY9gyg=; b=ld9bFilsdctXB6NqpgVI6zAbg213ENoek+qr4l+B39kkKzvYoEWRofke4Lc53hoUJg qC+SyoRVDkZUVCETL0iNEt4Bu5k8hov/O90tHQ3tfVB0cEMGddT2vg2lk/xluwLw2INL mQTYTr91443bqUi7MbOOC8/BBflMr1D457QYY33O51d5mTuBHEHWZYXHFM6He6lfusq0 Sm2AlXNKU9ifD3wpURir1w94SFW70ChnIK7yUhGi6M/JSJkOSJ7C0De2mBzCIC/gVATA WSxttIJezbcxbN9f4f/ogDx3Y+Hk0NSUfd0ixkTFf8Lqo1hgli89FJhmlv3SPxmO8fZ3 AlbA== 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 o192si7231929pgo.129.2019.02.01.07.08.32; Fri, 01 Feb 2019 07:08:48 -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 S1730112AbfBAPH6 (ORCPT + 99 others); Fri, 1 Feb 2019 10:07:58 -0500 Received: from foss.arm.com ([217.140.101.70]:33084 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729043AbfBAPH6 (ORCPT ); Fri, 1 Feb 2019 10:07:58 -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 EF41080D; Fri, 1 Feb 2019 07:07:57 -0800 (PST) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 90E1C3F589; Fri, 1 Feb 2019 07:07:55 -0800 (PST) Subject: Re: [PATCH v4 00/10] steal tasks to improve CPU utilization From: Valentin Schneider To: Steve 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> Message-ID: Date: Fri, 1 Feb 2019 15:07:53 +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: 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 20:30, Valentin Schneider wrote: [...] > ----->8----- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 17ab4db..8b5172f 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7152,7 +7152,8 @@ done: __maybe_unused; > rq_idle_stamp_update(rq); > > new_tasks = idle_balance(rq, rf); > - if (new_tasks == 0) > + if (new_tasks == 0 && > + (!static_key_unlikely(&sched_energy_present) || READ_ONCE(rq->rd->overutilized)) > new_tasks = try_steal(rq, rf); > > if (new_tasks) > -----8<----- > As a heads-up, that should now use sched_energy_enabled() [1], so that'd be: -----8<----- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f28df187db24..2eddb40fd368 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7134,7 +7134,8 @@ done: __maybe_unused; rq_idle_stamp_update(rq); new_tasks = idle_balance(rq, rf); - if (new_tasks == 0) + if (new_tasks == 0 && + (!sched_energy_enabled() || READ_ONCE(rq->rd->overutilized))) new_tasks = try_steal(rq, rf); if (new_tasks) ----->8----- [1]: f8a696f25ba0 ("sched/core: Give DCE a fighting chance") [...]