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 CC994C77B75 for ; Tue, 16 May 2023 12:50:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233262AbjEPMu1 (ORCPT ); Tue, 16 May 2023 08:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232355AbjEPMuR (ORCPT ); Tue, 16 May 2023 08:50:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC7845B98 for ; Tue, 16 May 2023 05:50:12 -0700 (PDT) Date: Tue, 16 May 2023 14:49:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684241410; 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=rCUAXEAsz8309DJ9AGeQPUzpXuEWHVO6qRyqAWRVdGI=; b=QwW4zij8tFKvA6c/0M7cutc/kQAnHfjX3rN4w6viZLaf8nLbCJ1lAeX8tiTktLdLQW4uRk RvBzmK7gmYeVMm2lxS+KU0x8oOHoVC8Lor0oT64hb2aj4LapU0jOqA4I6AavOOjwYypXK+ s4PZoXXpilqtxWjEsoasyYVnNwxcbiTRl0bHiQk/GsXeDd+iQpgtNcXyWrwLNijWvceQp6 zZ80kqsKd/g2Erb/INHI7y6V451PsVqHZlPDCkco4UMN2AuRcbYbnoFmKgayFKNRMNF7A9 dAX7BJwz1hjpUDjSbM8OkCPwty9W3ZulqiSwBOi21gyloPxshSEf4ln8jU0sNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684241410; 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=rCUAXEAsz8309DJ9AGeQPUzpXuEWHVO6qRyqAWRVdGI=; b=FIajb0NAwUZMWmkU1adZPzUriJP4OwIH4AKExWtzhCY/SjU/RnupMeSqqe+cPMeCfvXl8F KepY6KNA6OHwxfDw== From: Anna-Maria Behnsen To: Sebastian Siewior cc: Frederic Weisbecker , linux-kernel@vger.kernel.org, Peter Zijlstra , John Stultz , Thomas Gleixner , Eric Dumazet , "Rafael J . Wysocki" , Arjan van de Ven , "Paul E . McKenney" , Frederic Weisbecker , Rik van Riel , Steven Rostedt , Giovanni Gherdovich , Lukasz Luba , "Gautham R . Shenoy" Subject: Re: [PATCH v6 19/21] timer: Implement the hierarchical pull model In-Reply-To: <20230515124133.XkKOksjW@linutronix.de> Message-ID: <52a33c96-70ff-e670-acdf-7fc9b25884d7@linutronix.de> References: <20230510072817.116056-1-anna-maria@linutronix.de> <20230510072817.116056-20-anna-maria@linutronix.de> <20230515101936.3amAvw0T@linutronix.de> <398d7731-f5ca-a34-9e4-77da60c49d21@linutronix.de> <20230515124133.XkKOksjW@linutronix.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-901538274-1684241410=:21271" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-901538274-1684241410=:21271 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Mon, 15 May 2023, Sebastian Siewior wrote: > On 2023-05-15 12:50:25 [+0200], Anna-Maria Behnsen wrote: > > The part will be replaced by: > > > > ---8<---- > > > > local_irq_disable(); > > timer_lock_remote_bases(cpu); > > Do you s/raw_spin_lock_irq/raw_spin_lock/ in timer_lock_remote_bases()? > Otherwise you disable interrupts twice. Not wrong but not needed. Yes, I do so. And I also drop the return value and take the locks unconditianlly. > > raw_spin_lock(&tmc->lock); > > > > if (!tmc->online || !tmc->idle) { > > timer_unlock_remote_bases(cpu); > > goto unlock; > > } else { > > fetch_next_timer_interrupt_remote(jif, now, &tevt, cpu); > > } > > > > timer_unlock_remote_bases(cpu); > > The locking, unlocking and fetch_next_timer_interrupt_remote() is only > used here. So it if it wouldn't be for tmc-> then you could do > everything timer.c in once place… I thought about it, but then the logic has to be moved to timer.c but it is timer_migration related code... I would like to keep the logic here in timer_migration code... will send a v7 soon. Thanks, Anna-Maria --8323329-901538274-1684241410=:21271--