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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 565EDC433E0 for ; Tue, 19 May 2020 20:54:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17F5B207D4 for ; Tue, 19 May 2020 20:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbgESUy4 (ORCPT ); Tue, 19 May 2020 16:54:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:51490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgESUy4 (ORCPT ); Tue, 19 May 2020 16:54:56 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BEFF62075F; Tue, 19 May 2020 20:54:54 +0000 (UTC) Date: Tue, 19 May 2020 16:54:53 -0400 From: Steven Rostedt To: Matthew Wilcox Cc: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , "Paul E . McKenney" , Linus Torvalds , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 2/8] radix-tree: Use local_lock for protection Message-ID: <20200519165453.0a795ca1@gandalf.local.home> In-Reply-To: <20200519204545.GA16070@bombadil.infradead.org> References: <20200519201912.1564477-1-bigeasy@linutronix.de> <20200519201912.1564477-3-bigeasy@linutronix.de> <20200519204545.GA16070@bombadil.infradead.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 May 2020 13:45:45 -0700 Matthew Wilcox wrote: > On Tue, May 19, 2020 at 10:19:06PM +0200, Sebastian Andrzej Siewior wrote: > > The radix-tree and idr preload mechanisms use preempt_disable() to protect > > the complete operation between xxx_preload() and xxx_preload_end(). > > > > As the code inside the preempt disabled section acquires regular spinlocks, > > which are converted to 'sleeping' spinlocks on a PREEMPT_RT kernel and > > eventually calls into a memory allocator, this conflicts with the RT > > semantics. > > > > Convert it to a local_lock which allows RT kernels to substitute them with > > a real per CPU lock. On non RT kernels this maps to preempt_disable() as > > before, but provides also lockdep coverage of the critical region. > > No functional change. > > I don't seem to have a locallock.h in my tree. Where can I find more > information about it? PATCH 1 ;-) https://lore.kernel.org/r/20200519201912.1564477-1-bigeasy@linutronix.de With lore and b4, it should now be easy to get full patch series. -- Steve > > > +++ b/lib/radix-tree.c > > @@ -20,6 +20,7 @@ > > #include > > #include > > #include > > +#include > > #include /* in_interrupt() */ > > #include > > #include