Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbbD3SHf (ORCPT ); Thu, 30 Apr 2015 14:07:35 -0400 Received: from casper.infradead.org ([85.118.1.10]:41873 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831AbbD3SHd (ORCPT ); Thu, 30 Apr 2015 14:07:33 -0400 Date: Thu, 30 Apr 2015 20:07:21 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: LKML , linux-rt-users , Thomas Gleixner , Sebastian Andrzej Siewior , Clark Williams , Dave Chinner Subject: Re: [PATCH][RT] xfs: Disable preemption when grabbing all icsb counter locks Message-ID: <20150430180721.GX5029@twins.programming.kicks-ass.net> References: <20150430123303.30f5bd12@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150430123303.30f5bd12@gandalf.local.home> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 33 On Thu, Apr 30, 2015 at 12:33:03PM -0400, Steven Rostedt wrote: > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c > index 51435dbce9c4..dbaa1ce3f308 100644 > --- a/fs/xfs/xfs_mount.c > +++ b/fs/xfs/xfs_mount.c > @@ -1660,6 +1660,12 @@ xfs_icsb_lock_all_counters( > xfs_icsb_cnts_t *cntp; > int i; > > + /* > + * In PREEMPT_RT, preemption is not disabled here, and it > + * must be to take the xfs_icsb_lock_cntr. > + */ > + preempt_disable_rt(); > + > for_each_online_cpu(i) { > cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i); > xfs_icsb_lock_cntr(cntp); > @@ -1677,6 +1683,8 @@ xfs_icsb_unlock_all_counters( > cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i); > xfs_icsb_unlock_cntr(cntp); > } > + > + preempt_enable_rt(); > } The irony, this is distinctly non deterministic code you're putting under a RT specific preempt_disable ;-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/