From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932608AbdJaWaK (ORCPT ); Tue, 31 Oct 2017 18:30:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47428 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753619AbdJaWaJ (ORCPT ); Tue, 31 Oct 2017 18:30:09 -0400 Date: Tue, 31 Oct 2017 23:29:59 +0100 (CET) From: Thomas Gleixner To: Masahiro Yamada cc: Peter Zijlstra , Ingo Molnar , "Paul E . McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] genirq: add mutex and rcu locking to irq_desc_tree In-Reply-To: <1509416928-7450-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: References: <1509416928-7450-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 Oct 2017, Masahiro Yamada wrote: > Add a mutex to prevent concurrency on the updater side of the > irq_desc radix tree. The callers of insert/delete are already serialized by sparse_irq_lock. SO why would we need yet another mutex? > Add rcu_read_lock/unlock to the reader side so that lifetimes of > leaf pointers of the radix tree are correctly managed. That rcu protection is only needed for callers which have special life time requirements and they have that already. For the bulk of the callers rcu read lock is not required unless I'm missing something. Thanks, tglx