Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp894578imi; Fri, 22 Jul 2022 11:58:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdvMQ2XzdyotpSbGH7EZvH4uTR8eHi8rocMGeppJcRGKfp/HUeW/XmrenKT1uFQIXir+Ns X-Received: by 2002:a05:6402:1159:b0:43b:bc82:5ddb with SMTP id g25-20020a056402115900b0043bbc825ddbmr1191092edw.355.1658516337399; Fri, 22 Jul 2022 11:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658516337; cv=none; d=google.com; s=arc-20160816; b=jzrG9xg4Mn0lT9EeALJdwSLryYqs9kZjINNawN0A9LZQbf0TJl4WG0TnWPvJWvSuhz gTSq9U0DgR6w715G/wCejVQ6CdLqsAM/CtkdrPW3ALiyKY3F7G2mFfMVCfDjowFLvcTi Fouxs41PUoPdLnSXQk/r3G/OQGRZjWG38D9spWuNF+DcYgNBkupNJvSesZC7fR5TXRjk 4CjDk5dMn5EyG3545FdMTxOQFZOueBg7x4uRI8YCtH9rOH7JMG13BrKj3FRhdr9FF6qy bOSUb8W1BCEEZ+3BQ3O+1s62yR1uRgpNTle1tzaCtM3ZuJuLjYgV8pZTwrMlZlvj8Dps u4uA== 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:dkim-signature; bh=x4xFwLeu27SOsLoPyGfh0+QpaXnP2y9e0sTNZTVE09g=; b=CjNHdAUyEGLuOH6r2WzrZfTRzCiChRf72vxWjNVhD2pcLA+wCUdMqA+rvoAT7KagYT Ck16/6NcPITNglpzJOP/vUCB6txYZ95thill2wlT9SDXpc9Yirw6noksX2nIUFEB9k5c kX1xIPmrKX6O9JZIH1jws/VsWkuXzlS76kwQcx8qGLiWTsC0exzaOlM/DSbWARFhGFVY Eg+tgnROW9B5DooCsKRcyqWPWSE1YeGIMW09jsU4vn/02crWoA/Lepk+9O/Gfz/MHrlh ZcXFdIi3lCa+dUv8PGgCNIxjrZCj7iQ0TAknKSuLZZ1sTStqJNED/1L2Dvzpi9cli1cz 2LtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ZSU8m/Ws"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rv5-20020a17090710c500b0072f8785a8aasi6294339ejb.273.2022.07.22.11.58.32; Fri, 22 Jul 2022 11:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ZSU8m/Ws"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233512AbiGVSfn (ORCPT + 99 others); Fri, 22 Jul 2022 14:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiGVSfk (ORCPT ); Fri, 22 Jul 2022 14:35:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 987FF7B1EB for ; Fri, 22 Jul 2022 11:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658514938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x4xFwLeu27SOsLoPyGfh0+QpaXnP2y9e0sTNZTVE09g=; b=ZSU8m/Ws891r1KZ0KoaIblS3igaqLx51KwqHrT6rTuHspFFqn/uS7d9eaMuH1p6buJ+bxU gSnPI4YXXNu2wkHubeqtjo9WLR2d485JkLimYbNTWVref7gDcNTR0C6ZX8bRJv/cFMWZuc vj3kHzCnDlVC52lE6W4HurWllpe4VJs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-573-qZ3zDxriNZe4EAkXl5rUpw-1; Fri, 22 Jul 2022 14:35:37 -0400 X-MC-Unique: qZ3zDxriNZe4EAkXl5rUpw-1 Received: by mail-wm1-f69.google.com with SMTP id v132-20020a1cac8a000000b003a34081050bso1340666wme.3 for ; Fri, 22 Jul 2022 11:35:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=x4xFwLeu27SOsLoPyGfh0+QpaXnP2y9e0sTNZTVE09g=; b=QoW4xOAZMGSV9dPb4tMN7lgJUonJ9nim5dDUiF8Sw3WEHFXWRzxgtSyT6PMAGqp+yy ZWHPThRodjha5RrVRMdU34UpbiNAgqkorTISJyEEFAfkVkaKq8UCI9AHvFWlsQTabkT1 VIVJhKL+usGoT1WocrWygyw404zToJjS7YXyS25TqiOI78BJifNUd1P78Nx1ZmUC9f69 D2WURhImwfBwranWjtDQJDTiWUB4jfSN/xdvaGEBTJeS4FY/H00jJq38IO5rZKOmLM0l UWHKgWyGQBqH85+ycxJ6xABuGRaOE+NiKR9pRgh6F24O/c2HAvOwgmp1JlvSih6CKMxr iiMQ== X-Gm-Message-State: AJIora8vxuRGVJb0G8G+XTIudd4DhQo/eGjd516YsS0HUCFy7JdJFXUC w+ERqmcWUdGsoqIbkh/4uhwJTPFktOhdApM2CJf3HtFcKaDuLno2yfty1MwojamTqmw1sBb6r7u ACcJObLbZvN2vrADcmJcxMcEw X-Received: by 2002:a5d:6e88:0:b0:21a:3403:9aa0 with SMTP id k8-20020a5d6e88000000b0021a34039aa0mr809577wrz.379.1658514936405; Fri, 22 Jul 2022 11:35:36 -0700 (PDT) X-Received: by 2002:a5d:6e88:0:b0:21a:3403:9aa0 with SMTP id k8-20020a5d6e88000000b0021a34039aa0mr809570wrz.379.1658514936151; Fri, 22 Jul 2022 11:35:36 -0700 (PDT) Received: from vschneid.remote.csb ([185.11.37.247]) by smtp.gmail.com with ESMTPSA id l37-20020a05600c1d2500b003a33227e49bsm5594126wms.4.2022.07.22.11.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:35:35 -0700 (PDT) From: Valentin Schneider To: Vincent Donnefort Cc: peterz@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, regressions@leemhuis.info, kernel-team@android.com, Derek Dolney Subject: Re: [PATCH v4] cpu/hotplug: Do not bail-out in DYING/STARTING sections In-Reply-To: References: <20220704131346.2650163-1-vdonnefort@google.com> Date: Fri, 22 Jul 2022 19:35:34 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/07/22 16:48, Vincent Donnefort wrote: > On Tue, Jul 19, 2022 at 04:12:03PM +0100, Valentin Schneider wrote: >> On 04/07/22 14:13, Vincent Donnefort wrote: >> > +static int _cpuhp_invoke_callback_range(bool bringup, >> > + unsigned int cpu, >> > + struct cpuhp_cpu_state *st, >> > + enum cpuhp_state target, >> > + bool nofail) >> [...] >> > + if (nofail) { >> > + pr_warn("CPU %u %s state %s (%d) failed (%d)\n", >> > + cpu, bringup ? "UP" : "DOWN", >> > + cpuhp_get_step(st->state)->name, >> > + st->state, err); >> > + ret = -1; >> >> On a single failure we'll get two warns (WARN_ON_ONCE() + pr_warn(), and >> then subsequently just the pr_warn()), is that intended? > > It does, this is to keep the backtrace that used to be here... but now, giving > a second thought, we can probably get rid of it and just keep the pr_warn()? > >> >> Also, why not have ret = err here? > > If two states fail, the ret wouldn't mean much, hence a default "-1" just for > the WARN_ONCE. Right > But if we drop the latter, that would simplify the problem of > knowing which error code to return. > We need to drop one of the two, the pr_warn() will probably be more useful if/when we need to debug this, so go for it.