Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp827900pxb; Thu, 15 Apr 2021 07:33:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7Cd0mj17WQGOHHoUpZqO08nvwmA+QHVDyzBC1dBAx4xq39sIJOOkcxGw0rWbe1YrPwmsM X-Received: by 2002:a17:902:b494:b029:e7:36be:9ce7 with SMTP id y20-20020a170902b494b02900e736be9ce7mr4136463plr.43.1618497192681; Thu, 15 Apr 2021 07:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618497192; cv=none; d=google.com; s=arc-20160816; b=fOcBJEHKf0gXftIuWrKkBmWOTc9D/cPcnXDTL9IlLjtGW0tABdr7XBgqfmgzy1Mavb uk4oxK1X79GJWdz9zyYuuD4v7NTt+SVsYsWa8s6VNHECQW0W4/CWY77OoJy6QlG+44dC EQvuvXxQaC6aG+wv0PPPVqMu63q1buw432tCHYC/ecyiupohi6/8XqZepss9Zfv6UsjF sLZ5znJakhUBnBDplx8UKIfpaikOo944FcG1Z93R+Icx3cceBloQrR3XFcPGOGZ67TIR gekMeuI+0eRUJahNvE4FtCAtGW2UKqWlwHh+xNAoQJyGLXh5YAqDVQX6IouWFMJBMwt3 BSrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=JNpUHjerKWZIjEGQIjLqtHXVh852Etu198DfjcuUM2w=; b=NaEvvu1BafCNDMY26295+c5IPO8VH716IIzOLb0GlwxzDYnIGKsS04/IX5GGuQ/5QS sxCDeqlzwfblKQPVThJ/nVgAJGuv2k8Q6L8rSx2u2yLoG8PnzImMfL77X4Rcv+DiDvcJ 03tPuI+tw9rccv1kKgnNzdc9vK4lLrKhIo0ADrVD1aFbr3vkYdmXsZ7MBfTwCWdj+cdR xwt8IrgEyutTBM+0+1lHeATfYT0RIKi2lqg6+J7Q5Tre6hOkc5pV/4qQ/18JAF5NHESB 7UIrZmaK8VxPRWguCDQbtELBLV9aEemVKsEAiOWH2z4fqQJsaDz6+e8Uw9vMR+CGRxXR Wd6w== 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 g1si3158669pgc.417.2021.04.15.07.32.59; Thu, 15 Apr 2021 07:33:12 -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 S233411AbhDOOcj (ORCPT + 99 others); Thu, 15 Apr 2021 10:32:39 -0400 Received: from foss.arm.com ([217.140.110.172]:47592 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233037AbhDOOci (ORCPT ); Thu, 15 Apr 2021 10:32:38 -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 9B362106F; Thu, 15 Apr 2021 07:32:15 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B4E293FA45; Thu, 15 Apr 2021 07:32:13 -0700 (PDT) From: Valentin Schneider To: Peter Zijlstra Cc: 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, vincent.donnefort@arm.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 In-Reply-To: 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> Date: Thu, 15 Apr 2021 15:32:11 +0100 Message-ID: <87a6pzmxec.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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) > {