Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp319258pxb; Thu, 21 Jan 2021 07:53:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDhnOSXlb5her+iWkjjlF6oNYHD8ph5auzxvHWOmHjqEsgQqPWdRQdUJY2dFhxhuem0vkE X-Received: by 2002:a17:906:36d4:: with SMTP id b20mr97142ejc.144.1611244409898; Thu, 21 Jan 2021 07:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611244409; cv=none; d=google.com; s=arc-20160816; b=AgLuSKgucHS4mppuKKj89lfO2sZvM0gGA3ekmFQniSYlltX2Jo/cQ5tSnyla3O+54e PZ0IHVLmDLoYWFoQ8AvQtl0G59mKvlxH4rfa4JBuct8vzIOY8w3uFd2ssysOY1e4E6B+ PwNDYfS+2vAdKnygnB5MJe9qzCnUBWCX9i3dWmR89MsEgZ+WO572Uuj/H0ItiTij/xJF vkVu6mF6z+oqMur08RS7ILhxxHL+V1oAasc5MyKI4kl89vRcHFLSs14kldmNgbZIwhq8 SJEWpN//qzEdWvHqQ0BjuTBKLEr+WrGxQlMNepCCAQu5IHek25kNb/oh8w/kjsg8fQHT /UmQ== 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=SEMRKQzkR34noOWZKFATU6VPwGxPNAlNlYha9Fc4fH8=; b=KBDug9V9vvQ6iatN4eM8nxyDd5v1900qkR5g4mlhiTT8EpZGWi4CabKLRGD6ILmyjP 5Oy0O8rfSioAQXTWq0lLGOXMSGPaCkIRnexHQt+kb3gv1GGqqJumAdByXcvP48JgjWbM sMb4lbFjv/LKikxmZ25+mY2/JvfXduhc3QAeDdx7HHDNAcvWv8JdX8HRZKPY36O8BRWX MsTU83ter5Zvv8gZxK83DBrPdv8WF4911h30JANy4qX85CAAgMXoZEVcDGTNC2ygtCRk M9INfCHhkXyPVq9T3bbA9VC0ZUK5Gg3O5BvM3XgQk08Wu7plcj5XIKUEEbXLYRPtcPsg NApA== 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 x21si1868032ejw.619.2021.01.21.07.53.05; Thu, 21 Jan 2021 07:53:29 -0800 (PST) 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 S2387749AbhAUPvf (ORCPT + 99 others); Thu, 21 Jan 2021 10:51:35 -0500 Received: from foss.arm.com ([217.140.110.172]:39772 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387448AbhAUPoT (ORCPT ); Thu, 21 Jan 2021 10:44:19 -0500 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 C659D11D4; Thu, 21 Jan 2021 07:43:20 -0800 (PST) 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 2201A3F68F; Thu, 21 Jan 2021 07:43:20 -0800 (PST) Date: Thu, 21 Jan 2021 15:43:15 +0000 From: Vincent Donnefort To: Peter Zijlstra Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, valentin.schneider@arm.com Subject: Re: [PATCH 4/4] cpu/hotplug: Fix CPU down rollback Message-ID: <20210121154314.GA439562@e120877-lin.cambridge.arm.com> References: <1610385047-92151-1-git-send-email-vincent.donnefort@arm.com> <1610385047-92151-5-git-send-email-vincent.donnefort@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 03:57:03PM +0100, Peter Zijlstra wrote: > On Mon, Jan 11, 2021 at 05:10:47PM +0000, vincent.donnefort@arm.com wrote: > > From: Vincent Donnefort > > > > After the AP brought itself down to CPUHP_TEARDOWN_CPU, the BP will finish > > the job. The steps left are as followed: > > > > +--------------------+ > > | CPUHP_TEARDOWN_CPU | -> If fails state is CPUHP_TEARDOWN_CPU > > +--------------------+ > > | ATOMIC STATES | -> Cannot Fail > > +--------------------+ > > | CPUHP_BRINGUP_CPU | -> Cannot fail > > +--------------------+ > > | ... | > > | ... | -> Can fail and rollback > > These are the PREPARE/DEAD states, right? It would be _really_ daft for > a DEAD notifier to fail. But yeah, I suppose that if it does, it will > indeed end up in CPUHP_AP_ONLINE_IDLE. > > Do we want to WARN when a DEAD notifier fails? > > Indeed, I couldn't find a dead callback which can return an error. So I suppose we could go for another strategy here, that would be to not allow failure for the dead states (i.e states < BRINGUP_CPU when hotunplug). In that case, the fail interface should probably disallow selecting those states and a WARN here would be good. -- Vincent