Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2464101ima; Mon, 22 Oct 2018 10:09:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV63SMkEYVly/+bl1fqv0sit6FoRTs+X2oItj3ANo0xmUVRoI3AoYlPguu/RG5YA93+GhJxyj X-Received: by 2002:a65:52c1:: with SMTP id z1-v6mr43004650pgp.65.1540228165432; Mon, 22 Oct 2018 10:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540228165; cv=none; d=google.com; s=arc-20160816; b=L85mBZJwqB3S+3fMcuCYJ2pOJLS/RQHhRNz2outH/uOmibQ+LvFnYtgX6Wjf6jzWif j6FoyiG9gLMy5fEoI9msncO1CDlmLl3J0Wq9zAAqxBLpBHrG6AIVvLjAa8a3Qr+x+h1u jGIBPwAFIJ43W2LA6Pi/rcV9mil/j/sLgrWURMufsmB6x4H4i7b+nbdWGIB0F2a4qXLE foMNr4HVImGPPpC1/1emH3bhY1lbQhKQKaCf0BkitCvaS4L4DQxXLtVxbxV8rGJJNWdO k+pYprvBOrdS9Xx2z6R7QHfh1uWw8BIaDmVka1wcQ8vk2L7R5rFrKXWzYWkXkmKupP0R vJUA== 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=FLOYoI1bRK7fDiusil94FHLHwhbNvTUERdR8vXQql2A=; b=l91V5uyqx/Kk+F3n7XxrZCfapgIVcuHN8GhK9dEHE04p0UuMTVNAyCS/zUZGOkfJq+ b66PcL5ZtNhnRM06gs3gBqRLy0VREltYS5WOB5UF6HjVelK09iIZTdyL+KHYHPj6DKty 0qy4EnipiYp1HYJ6RHqYjva5Xf3eIlFCbygKZ5qLyzVn1SsNGh7MuJcQy3Pq0VZirIJ0 0OgfnI61xLexRQ/Fdaj+Rgou6KtrNBJTgq3kz7r3vY2IEhhY4xnv1b1AS0eOcZq53t1T 8LShIwu97QmIw7PE+9m0OhmrYhsysWMPJsbM0G5XBxjuLnuZ7F2RQklbVHUUU4Thea33 6dog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fRFc8ol+; 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 p70-v6si19500060pgp.53.2018.10.22.10.09.09; Mon, 22 Oct 2018 10:09:25 -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=fRFc8ol+; 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 S1728697AbeJWB0V (ORCPT + 99 others); Mon, 22 Oct 2018 21:26:21 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43280 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbeJWB0U (ORCPT ); Mon, 22 Oct 2018 21:26:20 -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=FLOYoI1bRK7fDiusil94FHLHwhbNvTUERdR8vXQql2A=; b=fRFc8ol+zNyfvFTsDXZ4bkfEV vGL+udtlogmJS1ZmScGuSQL1S9yA3HtSQP6vDeOclCRxOralc1jLX7no3i0nit/+BvDDvCMeHFsMv 2uRo02f05ehmiuj1kPmHOoepirnlLGqIzTv9UnS3Za4ANl97lWiKYxyWwNRvJbdczpekOZUcj1Sr7 AtAKXzuJz6mU2H8PK3tWShzfzLglOXav0hXSxy40AfNOVbOQMJHBqBm8P9VpC42Hs6Ai/e1arYvmw B2Hx1qvcbmY9MHQVtATfJ8ilL6IkFPjZglp4llKRnihu+WhYlQSC0P2VUspjViNAfZNQ19mo9+W3z FC1Mv4Vbg==; Received: from [167.98.65.38] (helo=worktop) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gEdfK-00014R-K9; Mon, 22 Oct 2018 17:06:54 +0000 Received: by worktop (Postfix, from userid 1000) id 55AE86E082E; Mon, 22 Oct 2018 18:56:31 +0200 (CEST) Date: Mon, 22 Oct 2018 18:56:31 +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, Steven Rostedt Subject: Re: [PATCH 04/10] sched/fair: Dynamically update cfs_overload_cpus Message-ID: <20181022165631.GE3117@worktop.programming.kicks-ass.net> References: <1540220381-424433-1-git-send-email-steven.sistare@oracle.com> <1540220381-424433-5-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-5-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: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.