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 8909BC433FE for ; Wed, 5 Oct 2022 21:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231186AbiJEVIk (ORCPT ); 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: 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