Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1955590imu; Sat, 8 Dec 2018 10:49:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vvbxrpm9S/ELqcQLKYtREPEO+LK9THBPxELMkiV++zAfi/Mpc42t0jexb5Ib/sUPeWdM5t X-Received: by 2002:a62:c28e:: with SMTP id w14mr6705889pfk.115.1544294961960; Sat, 08 Dec 2018 10:49:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544294961; cv=none; d=google.com; s=arc-20160816; b=FILBmFOTAven99JYZJKGToohxHsmwQwnbf/w6BkzFxDLJLPEdV7gATTMaGRXs79eky 2DwVE8zfOLHi7fciPckkh24ANknDsrHx//s7tPftVbxlu7NeFIfAeqejkYGvnOT+5WHz hse4vb+zYfwzThvIuGsv4ZGGYhoYthVjQjjB9ALc7cyLVsrnPM+PjPSFq+TMJSkr1h9O gC9baPwssfBG+Q/CWh8zHPfUpygcfXksxnKbOx37MdqLyecmPEurqFwisaFTU+MWpY/S kelfDEmr6/j00s1VB5o3Sg1WNPA5tXRBQVjZDq+qyzQ0ilr072uq/7uWKgMyz2VRCmdg 7rCw== 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=5YoT8nPSUmJ4WqJeSGl8yf5No94yTOmMca9xmPrBRdI=; b=dLvynwOeGWWExRoKjdf4zZpHBjE8AADueGTd2woLwbawHHWrVfxJkweVx2DzSsUV2j zAMSPGOTi4yQo8k6cpoGxLvoCSPYjWnTRI/FR5s5c4OU3k+q6g6RIax5VKAz7J5MfChS 8MGHwWVsS6811zBXvq84vgxQhDap6WDZpODJfY5ysLHwoxcQk2CzPz6xj42f24FwkQi5 ihMvYn51571Gz0zPZ2s23GLtd+dw4d1vK+WSp7BE5iN9TurehT0lqeKTLcJe/Np9Zllw BLnUX9Cohqq6nf0u0nClXBXre4JPyR3aMcrv/Z9Ed2wyep1NWy2ZU7mLQMcAcJOhwVoT qEtw== 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 g187si6170790pfc.43.2018.12.08.10.49.06; Sat, 08 Dec 2018 10:49:21 -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 S1726191AbeLHSrU (ORCPT + 99 others); Sat, 8 Dec 2018 13:47:20 -0500 Received: from foss.arm.com ([217.140.101.70]:34298 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbeLHSrT (ORCPT ); Sat, 8 Dec 2018 13:47:19 -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 29E63EBD; Sat, 8 Dec 2018 10:47:19 -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 88B4C3F575; Sat, 8 Dec 2018 10:47:16 -0800 (PST) Subject: Re: [PATCH v4 04/10] sched/fair: Dynamically update cfs_overload_cpus 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-5-git-send-email-steven.sistare@oracle.com> <3ec57357-dc4e-be1b-963f-abcf760ecc5a@arm.com> From: Valentin Schneider Message-ID: <8e032913-a426-0f32-6c68-a183bfc7ed66@arm.com> Date: Sat, 8 Dec 2018 18:47:13 +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 22:35, Steven Sistare wrote: [...] >>> @@ -4468,8 +4495,12 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq) >>> dequeue = 0; >>> } >>> >>> - if (!se) >>> + if (!se) { >>> sub_nr_running(rq, task_delta); >>> + if (prev_nr >= 2 && prev_nr - task_delta < 2) >>> + overload_clear(rq); >>> + >>> + } >> >> Eventually it'd be nice to squash those into {add, sub}_nr_running(), but >> you already mentioned wanting to stick to CFS for now, so I don't think >> it's *too* much of a big deal. > > Maybe. It depends on a design decision to be made if/when we add bitmap > based stealing to other scheduling classes. Do we maintain one bitmap > for overloaded CPUs where the overload may be caused by any mix of different > task classes? If yes, then the bitmap search for one class such as RT > will inspect and reject overloaded CPUs that only have CFS tasks, which > making the search less efficient. I am leaning towards a separate bitmap > per class to avoid that. > Didn't ponder too much about it, but a bitmap per class sounds sane. My comment was mostly about saving ourselves the need to decorate every {add, sub}_nr_running() call with overload_{set, clear}() calls. > - Steve > >