Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp679015ybh; Sat, 3 Aug 2019 07:33:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMzucLTAcVn/ZZS9NagoIJ+4v5J0WsWyxlOiqlkfRXxAyF/2Qglje4je2td8cCisLXc0yP X-Received: by 2002:a17:902:59c3:: with SMTP id d3mr132169280plj.22.1564842829825; Sat, 03 Aug 2019 07:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564842829; cv=none; d=google.com; s=arc-20160816; b=VKnOuFbFiodZhoPMpS7m8zadC0ucNN3UlvSwK8KM7WwK6BRLiN0c9AZ3My8iLTNt3G 2W5+sdAy3MGQxjgvDJq+CkdsaLZrNWlNLJ9HEEpnXx0CozPDx1fBL3R3Henzaog4oIr5 uP8/7KUIebcND2sD2rrqlR5O66vkBRI9FhlLQGxfg1YfoB5A5+ZVCVvbT7TE9ywe/dPP K0HEATRiY3wlEycvQq419LIEJnGR96pD6inKtQ1LP6MH9GHEjkgmz6fZwAlKuCi0kfHE wQd9YaIW+4WbXi+sOX9RWI1OQi51svnHiE6RzDjgo2but+Y2rXzhTCCHnMLrY0pTwdF7 JDlA== 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; bh=wIygmb4DI4BqIYtwaXRCq4UBtZhFaszfhLMjQJ7n5DY=; b=q1swm3BMSCrM0W8MvzWFjCpsLzSd1Zp0clIcqbPGBgxAilFYXlVHuq1ZAWyL/rnHG7 Bzoxu1RrmBAp8eUgq6kqeVU0QDtXbk41C/AVZZyKCVonwFHmc9jjDKziic8QVdkfbLV6 FlO4uKHRv3tgv9oHBxFP+v2eOmyEK7mFh8e2TQWdobVkoUvoN0OP9xyumLS/0uc3/BQo qTCZQsAqfZSzLAgoGUu+A+ws0kn4WlFYIQ67x1ztqckgVNQdXo6nsRrXCwT66PXWKfSF lrDUXywYqtUeYipVfWgxqcae8dZ06W2KSLoe6VvufmzR9XsnlDuySmd2GlXfd/1BUL7V N6Rg== 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 j1si38793365pfr.52.2019.08.03.07.33.34; Sat, 03 Aug 2019 07:33:49 -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; 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 S1731940AbfHBPWC (ORCPT + 99 others); Fri, 2 Aug 2019 11:22:02 -0400 Received: from foss.arm.com ([217.140.110.172]:53960 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731684AbfHBPWC (ORCPT ); Fri, 2 Aug 2019 11:22:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D0BB1596; Fri, 2 Aug 2019 08:22:01 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (unknown [10.1.194.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9EEC43F575; Fri, 2 Aug 2019 08:22:00 -0700 (PDT) Date: Fri, 2 Aug 2019 16:21:58 +0100 From: Qais Yousef To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Thomas Gleixner Subject: Re: [PATCH 0/5] Fix FIFO-99 abuse Message-ID: <20190802152157.7fp775lg7tbm5rec@e107158-lin.cambridge.arm.com> References: <20190801111348.530242235@infradead.org> <20190801131707.5rpyydznnhz474la@e107158-lin.cambridge.arm.com> <20190802093244.GF2332@hirez.programming.kicks-ass.net> <20190802102611.54sae3onftck5fye@e107158-lin.cambridge.arm.com> <20190802124151.GG2332@hirez.programming.kicks-ass.net> <20190802140854.ixq4cmo5nsfdaj24@e107158-lin.cambridge.arm.com> <20190802143324.GH2332@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190802143324.GH2332@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/19 16:33, Peter Zijlstra wrote: > > > Also also, RR-SMP is actually broken (and nobody has cared enough to > > > bother fixing it). > > > > If you can give me enough pointers to understand the problem I might be able to > > bother with it :-) > > So the push-pull balancer we have (designed for FIFO but also applied to > RR) will only move a task if the destination CPU has a lower prio. In > the case where one CPU has 3 tasks and the other 1, and they're all the > same prio, it does nothing. For FIFO that is fine, for RR, not so much. > > Because then the one CPU will RR between 3 tasks, giving each task > 1/3rd, while the other will only run the one task. Okay so what we need to do is keep a count of number of RR tasks on each CPU (which we already do IIRC) and take that into account in find_loweset_rq()/cpupri_find(). Let me see if I can create a test case then hack something. Thanks -- Qais Yousef