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 9BB42C433FE for ; Mon, 14 Feb 2022 14:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355391AbiBNOtn (ORCPT ); Mon, 14 Feb 2022 09:49:43 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355383AbiBNOtk (ORCPT ); Mon, 14 Feb 2022 09:49:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83D784D26A for ; Mon, 14 Feb 2022 06:49:28 -0800 (PST) Date: Mon, 14 Feb 2022 15:49:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644850167; 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=IyCvB7KwylgRZ+t8Dz4cSlAiX5vo7CCD/TI1SVOF4yE=; b=3hRc4Lsu7xIl8PCUzGEYyGHkD5pmduBFGAkLeUjHBl4kFQ0R9LvIdOLDuf8PI1NndMYgPB rOnWsAH0jKaxoQiPVCX4io6x7HgevbDF7M6XouVzy4U1Z8Ydgd7Nq9qvnGKNvBcyd8gWc5 Dvnr1wPHkfLJpUE0z87CT2UzKWmyKyz2M2kwgSaf/Ve91FIALm/qF/rjvVgFD5hvXmGxws oIxpQCirn52gPUUs8IQyfOiklrmVg1bc4MBYVf8iwG0yxxAuZbm19EOKXBZYTCFVPPWSRu 0PTkICl5AMe2hJiNyFAEkIqsAlFWy89cLC11xucyKIyC73oTL5npzB/O3mOgYg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644850167; 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=IyCvB7KwylgRZ+t8Dz4cSlAiX5vo7CCD/TI1SVOF4yE=; b=p99NsjSgb/EbSw1prGR6oPzkbwAqiCKWG+KEvhYvEN5AURvBrwPD6X+5Axr5tAnWXHpXJC k4QjDRS2fXNZZqBA== 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 In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-02-14 15:42:50 [+0100], Jason A. Donenfeld wrote: > Hi Sebastian, Hi Jason, > If we move this to startup, is there a phase during which no interrupt > will arrive? That is, can this happen very very early in startup, so > that zeroing out count happens *before* ++count? Interrupts will arrive starting with CPUHP_AP_ONLINE_IDLE from the CPU HP point of view. My suggestion had a check for upper most bit and only clear count if that bit was seen. So we wouldn't clear the counter if we wouldn't suspect one of the rare corner cases. > Jason Sebastian