From patchwork Thu Aug 1 01:01:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 1140185 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45zXSg41v8z9sDQ for ; Thu, 1 Aug 2019 11:16:51 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729565AbfHABQr (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-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@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