From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from r3-11.sinamail.sina.com.cn (r3-11.sinamail.sina.com.cn [202.108.3.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D646A35B628 for ; Thu, 12 Feb 2026 13:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770902826; cv=none; b=jy2A0APcwOew1May6Md1u2Uk1+I4VtWqGI7YUXF5Za2Kl+Pj+uiehuN355kdGEzvkv7NqYopMDORN9URYXLvXO/tGqCmTt11zJ1+qYGXEP0Z6MpyAtC0g+pcMWnyOVJesEWQssCVGS+W3vB2slE1PYRceMy0G+cL4/HATHOZRmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770902826; c=relaxed/simple; bh=DDckpbX1Mf0vJIHpXEvtnuexbTx8CKJBYIaj4WrgeN8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WHCARspFxELO7FaiOHG2dtFM/CbVTRufb5J99Dj4IxBBvDiYpic702UIlW6TOsSgcYXGt6ZltwsKpK69em13vsKP6tDYa7O4aF2w8p/2SsYEKd1yByyZs0O7TErwShGVbidozDYCjBbutj57pnSzwrWiWR/LeREMdUPtBq/CY7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=O8Ks6swH; arc=none smtp.client-ip=202.108.3.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="O8Ks6swH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1770902824; bh=MFNqD27f/iIbabrusGiA5uEQ9ktT47oGuegporyJHW0=; h=From:Subject:Date:Message-ID; b=O8Ks6swHYuhxibSbEq45eYtAJqreOv1t2jFNwzlOWs0dEXkMqP9WAbP8lwL0Sx6od u4GHHHzmv3t7Q3iW8++TSLUZdT+vKFjf20uUGocMpiL96r+NDuYBLlUTXQKal5MFgd ZUhFjvdAnhZ9B2tfFtB1IxkzQzGFIbrnXoe8jQfs= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.34) with ESMTP id 698DD51D00007645; Thu, 12 Feb 2026 21:26:54 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 8693756291925 X-SMAIL-UIID: 739880581B1348538D7438C2169D1226-20260212-212654-1 From: Hillf Danton To: "Ionut Nechita (Wind River)" Cc: axboe@kernel.dk, torvalds@linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, bigeasy@linutronix.de Subject: Re: [PATCH v3 1/1] block/blk-mq: use atomic_t for quiesce_depth to avoid lock contention on RT Date: Thu, 12 Feb 2026 21:26:43 +0800 Message-ID: <20260212132644.2998-1-hdanton@sina.com> In-Reply-To: <20260212071418.7622-1-ionut.nechita@windriver.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 12 Feb 2026 09:14:18 +0200 Ionut Nechita (Wind River) wrote: > > PREEMPT_RT has been merged into mainline since v6.12. There is no > separate RT tree for this kind of fix anymore. The spinlock in question https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/ > converts to rt_mutex under PREEMPT_RT, which is now a mainline > configuration option, so the contention issue is a mainline problem. > CONFIG_PREEMPT_RT can not be found in your patch. > Beyond the RT aspect, replacing the spinlock with atomic_t in the hot > path is arguably a simplification that benefits all configurations - > it removes locking overhead and eliminates the two-variable > synchronization (quiesce_depth + QUEUE_FLAG_QUIESCED) in favor of a > single atomic counter. > Then it was not wise to add the spinlock, yes?