Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2596097ima; Mon, 22 Oct 2018 12:26:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FmijPuhvI5YVg5/nWkVdlQ+BA+o6duyeWJMhwHlgzcho7/Af0/Bta0H1SBQxNwN414yRo X-Received: by 2002:a63:46:: with SMTP id 67-v6mr12763870pga.92.1540236368930; Mon, 22 Oct 2018 12:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540236368; cv=none; d=google.com; s=arc-20160816; b=a+GqU5/q+MYRx/mCjISfh4zJVZORa4Py3HVHXrsXCxDYGf9hsYqhzqLNYrHWfZLcRM AGZvJBy6ndaaZycU0bDI+FtLSdty5b63Jp96+5GG0E5OUi8rcfs8iry/oqN62IP2aN28 V4B38Qw+xBgVcshVk+5v+bRDYcukXeJvwUD0yQAAcTD1yG6gyQoMBDFiTzZUa+cTAa0T UYp7Cm6v5cj5Jf6NQ2jMlCAVgkfkM436/dDiVBZ5GGg/HKc8Hsq8fjzhSjfCfQSWxPfC Q5Eb4PFcgWTCIOGb+S3PbFB08a4PvicPXH4bRDlKm+gAs1wF4wPBQtEVPRKNcAMc9XW9 QfeQ== 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:organization:from:references:cc:to:subject :dkim-signature; bh=TJgdqb+fAnq8zFcP2+X9tzf8Wu13WFRRHygZlwtTTR4=; b=0RAWF10ufErJgb8LON5fEUN/qFSjJPlwgJt8PVcF+8wStMybuamYbYPHEWk49XGyIM rbnYi9ZE5zqYuWLtGSSkpAAVHwsRpoQZEJS2uIPtSSWNkn04slT/1ypY2YePLc4X8K6t LGJ3OlPL5Rs0slvYvqoeAgvnMmWp7XIDblW+waXu8nAN4x/YJLrsO5nMiN1vwClRRCRP AGDLxU9+MgkY84Svs7/CifaUeHllbP1GY9ddn/8EUaQvpdC0qwogVapsRNo+8r9VFKBd nH5LWvR5cNLvpvyb5rT0NOE/cvmPBSv7liguGKZjp9lmYhbOUqWaChZp4R31QUcnYJjt ijQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=BUGs1lly; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc1-v6si2365748plb.204.2018.10.22.12.25.52; Mon, 22 Oct 2018 12:26:08 -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=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=BUGs1lly; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728814AbeJWDEH (ORCPT + 99 others); Mon, 22 Oct 2018 23:04:07 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:38170 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728308AbeJWDEH (ORCPT ); Mon, 22 Oct 2018 23:04:07 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9MId5el151660; Mon, 22 Oct 2018 18:44:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=TJgdqb+fAnq8zFcP2+X9tzf8Wu13WFRRHygZlwtTTR4=; b=BUGs1llymg+4bP+dF5uC9sSYUG/o2qly3gVzyVHN3D1TEVuoORtdYn5Xu42QLa+3HXx/ Oxd/3jPxL7gLwMM+PunHhRJQS2/L/T3M+Fcwxi+nTpQsTzv4BKFh1eY1PBhkx/PeTZtN lHaM60pwERWqVBtVadUSyzrpK135VQ7J70J2OgtSsEFzUlFvwOpe4QE2oMO1tlvb0oJY vcWALeTbF+LAsFjCCM3uR5qEoEUE8GIG4+IgiIO8t5MDMmvKzP1n+ffpeRHMfcJbO0i6 v+rc//8dNlPjSKVyrYlBYLEVV1zNGhnQ3EcBdWeG/vAsXN4zhq3Ib46tuKVcqRdPbTM0 3w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2n7usu0hcm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Oct 2018 18:44:01 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9MIhxUH030089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Oct 2018 18:44:00 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9MIhwxn018732; Mon, 22 Oct 2018 18:43:58 GMT Received: from [10.39.206.107] (/10.39.206.107) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Oct 2018 11:43:58 -0700 Subject: Re: [PATCH 04/10] sched/fair: Dynamically update cfs_overload_cpus To: Peter Zijlstra 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, Steven Rostedt References: <1540220381-424433-1-git-send-email-steven.sistare@oracle.com> <1540220381-424433-5-git-send-email-steven.sistare@oracle.com> <20181022165631.GE3117@worktop.programming.kicks-ass.net> From: Steven Sistare Organization: Oracle Corporation Message-ID: Date: Mon, 22 Oct 2018 14:43:44 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181022165631.GE3117@worktop.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9054 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=989 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810220159 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/22/2018 12:56 PM, Peter Zijlstra wrote: > On Mon, Oct 22, 2018 at 07:59:35AM -0700, Steve Sistare wrote: >> An overloaded CPU has more than 1 runnable task. When a CFS task wakes >> on a CPU, if h_nr_running transitions from 1 to more, then set the CPU in >> the cfs_overload_cpus bitmap. When a CFS task sleeps, if h_nr_running >> transitions from 2 to less, then clear the CPU in cfs_overload_cpus. > >> @@ -5111,8 +5147,12 @@ static inline void hrtick_update(struct rq *rq) >> update_cfs_group(se); >> } >> >> - if (!se) >> + if (!se) { >> add_nr_running(rq, 1); >> + if (prev_nr == 1) >> + overload_set(rq); >> + >> + } > > This is very similar to what RT already has, except they also track if > the tasks in question is in fact migratable (p->nr_cpus_allowed > 1). > > And similarly, it might make sense to use the sparse mask thing over > there. Yes. I forgot to mention RT as likely follow on work. - Steve