From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67A71C433F5 for ; Mon, 14 Feb 2022 15:17:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346241AbiBNPRM (ORCPT ); Mon, 14 Feb 2022 10:17:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbiBNPRK (ORCPT ); Mon, 14 Feb 2022 10:17:10 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB13593BC for ; Mon, 14 Feb 2022 07:17:02 -0800 (PST) Date: Mon, 14 Feb 2022 16:17:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644851821; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/POc7+dE2pY24OqtAsA23BaK4CAfuqEPnI7uYCQWOY=; b=4CismoWTguXKx95kte1F97ud2x41ZCLGqoC0cpTbX05d+BmQYyoLDsTwPbbizUIdt8gbiW clOwP94SlXZZKZ8JL1VJQ7GZOmLsJCE5xZ8eRKvMOPhbEwpa9fIKgib1IjM6O8jiZHageI xjnmkWjufXKX/YyyypRjk54ZQkIk8eomvRAkn6SMWvzDkEI7PoCBKD3JOIqR27KjX0Ot+/ xcroWEk450ykqG2wJ0pg+Qp5FnJqozwFhQDRtgVm8jmxDbccLf811XnD7DajExp7e+RqSB BKCm+77vACfYEWotughpMp1saxV240A4sQaz+QEDcw8LK46Ord1hfszxtMhamw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644851821; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/POc7+dE2pY24OqtAsA23BaK4CAfuqEPnI7uYCQWOY=; b=VBoDF+998vYwslKUkL0Vj1yKI5XV7MIon4+lgkZDySabhZ47OOfLnw7EXrrGO9V2RyVGtm vkknHpiVEXk4RcCw== From: Sebastian Andrzej Siewior To: "Jason A. Donenfeld" Cc: LKML , Thomas Gleixner , Peter Zijlstra , Theodore Ts'o , Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , Sultan Alsawaf , Dominik Brodowski Subject: Re: [PATCH v2] random: set fast pool count to zero in cpuhp teardown Message-ID: References: <20220214133735.966528-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-02-14 16:10:36 [+0100], Jason A. Donenfeld wrote: > Hi Sebastian, Hi Jason, > On Mon, Feb 14, 2022 at 4:06 PM Sebastian Andrzej Siewior > wrote: > > But you acked my question regarding boot-up? So the teardown callback > > won't happen during boot-up. >=20 > I'd like to do only one method here, so we can set those fields in > startup, provided it happens early enough. > > > So I think it seems better to keep it before CPUHP_TIMERS_PREPARE, but > > > do it on startup rather than teardown. Seem reasonable? Would that > > > mean we zero out before IRQs are enabled? > > I would only zero it if the upper-most bit is there. >=20 > I still don't quite understand: why can't we just unconditionally > zero, always, before CPUHP_TIMERS_PREPARE? If you have a rollback before CPUHP_TIMERS_PREPARE you don't notice it and your worker may have skipped this work because it run on the wrong CPU. Also, I *think* that if you happen to have 64 interrupts between CPUHP_AP_ONLINE_IDLE =E2=80=A6 CPUHP_AP_WORKQUEUE_ONLINE then the scheduled worker is unbound and may run on the "wrong" CPU. > > And then have another one after >=20 > Two of them seems a little bit out of hand in complexity here... Let's > just find one phase where we can simply set variables without too much > fiddly logic. I'll send a v+1 of what I have in mind for the startup > path. Oki. > Jason Sebastian