Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2445011pxb; Mon, 19 Apr 2021 06:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzeQRJhxM9MZYen0dl6So6J2tZ3oGdYLlFERP4hFQJLTUrTsvU9Yzo610P4R76ae1NBJq+ X-Received: by 2002:a5d:5912:: with SMTP id v18mr14824868wrd.14.1618837338323; Mon, 19 Apr 2021 06:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618837338; cv=none; d=google.com; s=arc-20160816; b=khK7vtrb67XQe5l9JwV34dW7NaeQwwvhX79xpwnzo1F8LbZG137y+cKKcS1CwD4wHI jz4GMJ5i23bYA+EjeOkIsfiTJQBw61m+/aM3T2iTcfveeDFkaqsCehAiR4ySL1dghAdC YqlDZZmLcbs3lIS9R984rWIoPT3Tv+8LgVYqVgnSXyZ7IgCrcKdeAcFbitjRu7IL9OXu XTyJFXDTmc7NIXp1kqIfqG7jQefKmoDM0ZgCjaunQkc0cTiEqChpyTrKYsBzeBtWWJso xvfFCVJSMg9yYQy8SO8MpUnnOhx3Kl2wbX2RucdEtIC59keP1p4h/hkJ8fsS8UqXzVvg yWVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QtIny2+ddBLpqw3Bvj8oaaKuYoELJzBnBLWpHfq8PLw=; b=OuBHv4i6rzShRllow+S8jVCIxdwSmIghNUoyTr0HM2PiyvsU40D+IZLyDPML0uVtNI YPPloqPZB4XydWMm8pGYL5YoZmn+2oZR76xnY20Av2FaQEDJHppFHbZkWJEbBpCGxIPB CgXoAeqjcqXC6VHubFjpDKn4GXb/FMK0N0BERAAPFzhB/gxaQ6GUhPjWx5MSM+B86Xka 9jikmm+Lc112IrBmKy4vJIfM2Y2ZjH+sccw8q66dVZblUH70btEA37REQGNsDYyddxg6 AhX+JGWY2aTbDZv+n2mg9eZise+cn2Cz5V0MsIIzGQgZnsvaEe32U1ViI8ofSWIu8y+h TP6A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si12032917ejr.332.2021.04.19.06.01.52; Mon, 19 Apr 2021 06:02:18 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232313AbhDSK5H (ORCPT + 99 others); Mon, 19 Apr 2021 06:57:07 -0400 Received: from foss.arm.com ([217.140.110.172]:40408 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhDSK5G (ORCPT ); Mon, 19 Apr 2021 06:57:06 -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 E7F2E31B; Mon, 19 Apr 2021 03:56:36 -0700 (PDT) Received: from e120877-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0FC4B3F792; Mon, 19 Apr 2021 03:56:34 -0700 (PDT) Date: Mon, 19 Apr 2021 11:56:30 +0100 From: Vincent Donnefort To: Valentin Schneider Cc: Peter Zijlstra , tglx@linutronix.de, mingo@kernel.org, bigeasy@linutronix.de, swood@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, qais.yousef@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] sched: Use cpu_dying() to fix balance_push vs hotplug-rollback Message-ID: <20210419105541.GA40111@e120877-lin.cambridge.arm.com> References: <20210310145258.899619710@infradead.org> <20210310150109.259726371@infradead.org> <871rclu3jz.mognet@e113632-lin.i-did-not-set--mail-host-address--so-tickle-me> <87r1jfmn8d.mognet@arm.com> <87a6pzmxec.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a6pzmxec.mognet@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 15, 2021 at 03:32:11PM +0100, Valentin Schneider wrote: > On 15/04/21 10:59, Peter Zijlstra wrote: > > Can't make sense of what I did.. I've removed that hunk. Patch now looks > > like this. > > > > Small nit below, but regardless feel free to apply to the whole lot: > Reviewed-by: Valentin Schneider > > @VincentD, ISTR you had tested the initial version of this with your fancy > shmancy hotplug rollback stresser. Feel like doing this I indeed wrote a test to verify all the rollback cases, up and down. It seems I encounter an intermitent issue while running several iterations of that test ... but I need more time to debug and figure-out where it is blocking. > > > So instead, make sure balance_push is enabled between > > sched_cpu_deactivate() and sched_cpu_activate() (eg. when > > !cpu_active()), and gate it's utility with cpu_dying(). > > I'd word that "is enabled below sched_cpu_activate()", since > sched_cpu_deactivate() is now out of the picture. > > [...] > > @@ -7639,6 +7639,9 @@ static DEFINE_PER_CPU(struct cpu_stop_wo > > > > /* > > * Ensure we only run per-cpu kthreads once the CPU goes !active. > > + * > > + * This is active/set between sched_cpu_deactivate() / sched_cpu_activate(). > > Ditto > > > + * But only effective when the hotplug motion is down. > > */ > > static void balance_push(struct rq *rq) > > {