Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4271234pxu; Mon, 12 Oct 2020 14:26:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7aSXWNn9tZDsUHUaUDcWuF56P+VAvshB0P+uoR7/28p4PVt8cpCMpSqqBnBBNllzMNNBK X-Received: by 2002:a05:6402:289:: with SMTP id l9mr16763769edv.294.1602538000594; Mon, 12 Oct 2020 14:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602538000; cv=none; d=google.com; s=arc-20160816; b=TLJwICgx0zTPTDD5IC/DnwZaYFWQcu3av9AKQcMnk9N/Qy7RYUyAOqXr4H47DYEXoy EKKYEsmRd544zKq2FJ3TTZNYr7Y3ZxZRxC60bNmtfredPQ1dokGauw14MSy1gge9CKtJ fvEye4KbAG97ERKjvIhijB79KeXcAEz5psgULsPRzuyE7FletSbExMF3zQ81z24t/jOS vtSTcNsYnfnLFnCxrETTvzJpS/LU1kOjvKqNMq8+TzMb7bwJCL3KVZGC0ouijoAf5zFN uhNxkJIBScLF3VaIIzGA95LeJ2H9xYzJrwf3sNa7N+T4rZflkC6THsLXBPPmFeDV4Ivw 6+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qibnqW3/jBcA6KLTouvKyfDZONWPLgZFig9zBnTvLc4=; b=pFw4jlLopYLVkvcAzxRVhwxVaviuvq/aeSCvOOIOVSHC0acWedBZaa8GTZjGWhwHrU LF1x0XY7JNlZbnj4N5XDvsjGlhLRcbihUQXkeQVVD0frsNtBebTw2jdLuLvp6kcNHVZu wXVI0dWWSai+CKJSR4BqFYSLfYMExbeY5pv0+bOHjMo4s3fNn5G1MJFRWVg+PljQL6hG Exvpu05oRnrApQL9fWtWsqW58R9oUX0gqGB4Z7Yu7B0Z9meJvGL6sPmC/wJUqfK1NU10 QbepFDv39yGxlQ4SGTXfBaUc1XprMJ28eto2bIycsHchFAny/XeyaUZx1i9CVlXzglTd ksXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=awGNq7Pd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si12951571eds.570.2020.10.12.14.26.00; Mon, 12 Oct 2020 14:26:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=awGNq7Pd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgJLMwQ (ORCPT + 99 others); Mon, 12 Oct 2020 08:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbgJLMwQ (ORCPT ); Mon, 12 Oct 2020 08:52:16 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E75EBC0613D0 for ; Mon, 12 Oct 2020 05:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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; bh=qibnqW3/jBcA6KLTouvKyfDZONWPLgZFig9zBnTvLc4=; b=awGNq7PdfWKwVcchkDfeCjPEAW DbJGht8JeVFEucbFLJdpw0IQx4H0kJT2xYuDV5dzVcCgLHpZMAOr57i4rlXDh3rfbPD9S1bOm55yO rtK+hq7jIWDtlGLayHYF6mEA8yvYqH3QiAtg+Wx6v+k8ekyQv7Yd4BOyiBFM3sO/Iv7Ee182rvFGd qj6iJUJ/RQ9iMJyUqzfNgD9yYSJYIHC+IbH9cnXRQdMzy6La5X3IA1Z1m2ZeYGzm8bq1NEhnzfhx7 G4l9lTUJXgh+aapk7ysG3qkekwuD3jRHcJ6b7nohrv9ZLkhHEoNudSY5S9rL65kAKmBnsP0hJoFn2 /NYn2FlQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRxJ4-0007jE-Ck; Mon, 12 Oct 2020 12:52:02 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 53A7E304BAE; Mon, 12 Oct 2020 14:52:00 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1D64F2B8E927B; Mon, 12 Oct 2020 14:52:00 +0200 (CEST) Date: Mon, 12 Oct 2020 14:52:00 +0200 From: Peter Zijlstra To: Dietmar Eggemann Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, bigeasy@linutronix.de, qais.yousef@arm.com, swood@redhat.com, valentin.schneider@arm.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com, tj@kernel.org Subject: Re: [PATCH -v2 07/17] sched: Fix hotplug vs CPU bandwidth control Message-ID: <20201012125200.GW2628@hirez.programming.kicks-ass.net> References: <20201005145717.346020688@infradead.org> <20201005150921.661842442@infradead.org> <336a3916-1dd8-98cf-44e8-88dbf27018d5@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <336a3916-1dd8-98cf-44e8-88dbf27018d5@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 10:41:11PM +0200, Dietmar Eggemann wrote: > On 05/10/2020 16:57, Peter Zijlstra wrote: > > Since we now migrate tasks away before DYING, we should also move > > bandwidth unthrottle, otherwise we can gain tasks from unthrottle > > after we expect all tasks to be gone already. > > > > Also; it looks like the RT balancers don't respect cpu_active() and > > instead rely on rq->online in part, complete this. This too requires > > we do set_rq_offline() earlier to match the cpu_active() semantics. > > (The bigger patch is to convert RT to cpu_active() entirely) > > > > Since set_rq_online() is called from sched_cpu_activate(), place > > set_rq_offline() in sched_cpu_deactivate(). > [ 76.215229] WARNING: CPU: 1 PID: 1913 at kernel/irq_work.c:95 irq_work_queue_on+0x108/0x110 > [ 76.341076] irq_work_queue_on+0x108/0x110 > [ 76.349185] pull_rt_task+0x58/0x68 > [ 76.352673] balance_rt+0x84/0x88 > balance_rt() checks via need_pull_rt_task() that rq is online but it > looks like that with RT_PUSH_IPI pull_rt_task() -> tell_cpu_to_push() > calls irq_work_queue_on() with cpu = rto_next_cpu(rq->rd) and this one > can be offline here as well now. Hurmph... so if I read this right, we reach offline with overload set? Oooh, I think I see how that happens..