Re: [PATCH][RT] xfs: Disable preemption when grabbing all icsb counter locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux