Received: by 2002:ab3:72d2:0:b0:1f6:158b:59e2 with SMTP id p18csp22282ltf; Wed, 5 Oct 2022 14:10:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM57iqjBvjvoUnBiM0Pqd6tFyzmKhZpqjf0HgUAv/HAWo41d2AwvVIbWPZjybCAovZzHQB/a X-Received: by 2002:a17:90b:2686:b0:20a:d838:25d2 with SMTP id pl6-20020a17090b268600b0020ad83825d2mr1634725pjb.35.1665004207999; Wed, 05 Oct 2022 14:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665004207; cv=none; d=google.com; s=arc-20160816; b=T4JFLyjILwitzsup1yJ/02/IapGp6TEQ1c+NCNGuc6COm28LI06wKBP+7RQJDMLcj/ ghaFmVCs791fTl4A5s5o/DaK7hKYxTTiErRXbmO9j8oBiAG+xOyKgBfo8o7l/gMh+j3C 2twU5JqqkhRseOcQYmq6Ghp0as/DZTXHAjLiNKJ5LihLkONnlcysL1CmpZEZfw/IHfnh Nwm1Q1GWCNn58FKt+WC1/1GhxHqyMJmeWT0rfI1gBr5kRxB9E3Oo1si8PvB0jp1kV0gM ifbqIFILvE4Xn8Dnz6lCpabHxANxjkFya75tcCg66JT0Df6wOqXXr0Tg0SOr+lHcLiLx pR1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T0iSLSVi/n52XMFHM127/WLFmzaUyWKAiR6pK/M7lho=; b=VcU1AuCMbDtYIO7WB5f80Wty2sUeDuLkc7dcWaZkzgzjpouSAf0CfzngpalM9uzHrz jIHdFhwOBG7dJY9A+559BWLeS14EwQSg3UfQR9xwn3YUHq5O/qjIbZJkPE0roSGSYN1L uWvWPebedb10UprwnS7JZml+AsVNhWPMyi5+ETkPOERaW7lqUlz+1tRmfmg6mFSk3A6i quKkLu+rbp5PtBZA8YhD7V81C0teQ367Nr/SNF6p0/q6ayOjGQnvIV4WOBeY4snl05gK n49JVJ5EQ7PDcC2Vly32GHXUJCz7sxd7MESojMByWjUSPJc+REZcMFAnO3Vd2+1nxYDh EMYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=O7Mic4ki; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a17090a5a4100b00208ff8fd4cesi2688580pji.97.2022.10.05.14.08.56; Wed, 05 Oct 2022 14:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@zx2c4.com header.s=20210105 header.b=O7Mic4ki; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231186AbiJEVIk (ORCPT + 99 others); Wed, 5 Oct 2022 17:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231173AbiJEVIg (ORCPT ); Wed, 5 Oct 2022 17:08:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7643E69F56; Wed, 5 Oct 2022 14:08:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2239EB81F2C; Wed, 5 Oct 2022 21:08:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45E44C433D6; Wed, 5 Oct 2022 21:08:31 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="O7Mic4ki" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1665004109; 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=T0iSLSVi/n52XMFHM127/WLFmzaUyWKAiR6pK/M7lho=; b=O7Mic4kiBroXUePGTdFwmFAqvciFjlQdk25g0vGRCnfsk6sobXH1MHYwPiJhHhfY9dWkee 66Nd+U5emxWZ/gL81/h2O+z0+AkFaGoUg2Gdl7wjYw9uzRJuXM1TVWueIL+qUtsC9Hyw3x mWTfwSpXX0p//M9hGVguEnqRWN6ebNw= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 1ad1aca6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 5 Oct 2022 21:08:28 +0000 (UTC) Date: Wed, 5 Oct 2022 23:08:19 +0200 From: "Jason A. Donenfeld" To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Dominik Brodowski , Sultan Alsawaf Subject: Re: [PATCH 2/2] random: spread out jitter callback to different CPUs Message-ID: References: <20220930231050.749824-1-Jason@zx2c4.com> <20220930231050.749824-2-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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-crypto@vger.kernel.org Hi Sebastian, On Wed, Oct 05, 2022 at 07:26:42PM +0200, Sebastian Andrzej Siewior wrote: > That del_timer_sync() at the end is what you want. If the timer is > pending (as in enqueued in the timer wheel) then it will be removed > before it is invoked. If the timer's callback is invoked then it will > spin until the callback is done. del_timer_sync() is not guaranteed to succeed with add_timer_on() being used in conjunction with timer_pending() though. That's why I've abandoned this. Jason