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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 3E192C433FF for ; Thu, 1 Aug 2019 01:16:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1472C2067D for ; Thu, 1 Aug 2019 01:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729558AbfHABQr (ORCPT ); Wed, 31 Jul 2019 21:16:47 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33548 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729399AbfHABQj (ORCPT ); Wed, 31 Jul 2019 21:16:39 -0400 Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1hszhE-0002I1-Vj; Thu, 01 Aug 2019 03:15:57 +0200 Message-Id: <20190801010126.245731659@linutronix.de> User-Agent: quilt/0.65 Date: Thu, 01 Aug 2019 03:01:26 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Sebastian Siewior , Anna-Maria Gleixner , Steven Rostedt , Julia Cartwright , Jan Kara , "Theodore Tso" , Matthew Wilcox , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jan Kara , Mark Fasheh , Joseph Qi , Joel Becker Subject: [patch V2 0/7] fs: Substitute bit-spinlocks for PREEMPT_RT and debugging Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Bit spinlocks are problematic if PREEMPT_RT is enabled. They disable preemption, which is undesired for latency reasons and breaks when regular spinlocks are taken within the bit_spinlock locked region because regular spinlocks are converted to 'sleeping spinlocks' on RT. Bit spinlocks are also not covered by lock debugging, e.g. lockdep. With the spinlock substitution in place, they can be exposed via a new config switch: CONFIG_DEBUG_BIT_SPINLOCKS. This series handles only buffer head and jbd2, but does not touch the hlist_bl bit-spinlock usage. See V1 for further details: https://lkml.kernel.org/r/20190730112452.871257694@linutronix.de Changes vs. V1: - Collected reviewed-by tags for the BH_Uptodate part - Reworked the JBD2 part according to Jan's review: - Convert state lock to a regular spinlock unconditionally - Refactor jbd2_journal_put_journal_head() to be RT friendly by restricting the bit-spinlock held section to the minimum required operations. That part is probably over-engineered, but I'm sure Jan will tell me sooner than later. Thanks, tglx