public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* [ANNOUNCE] 3.2.9-rt16
@ 2012-03-06 10:20 Thomas Gleixner
  2012-03-06 13:50 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2012-03-06 10:20 UTC (permalink / raw)
  To: LKML; +Cc: linux-rt-users

Dear RT Folks,

I'm pleased to announce the 3.2.9-rt16 release.

Changes vs. 3.2.9-rt15:

  * cpu hotplug lock init fix [ Steven ]

  * seqlock fix CONFIG typo

The incremental patch against 3.2.9-rt15 can be found here:

  http://www.kernel.org/pub/linux/kernel/projects/rt/3.2/incr/patch-3.2.9-rt15-rt16.patch.xz

and is appended below.


The RT patch against 3.2.9 can be found here:

  http://www.kernel.org/pub/linux/kernel/projects/rt/3.2/patch-3.2.9-rt16.patch.xz


The split quilt queue is available at:

  http://www.kernel.org/pub/linux/kernel/projects/rt/3.2/patches-3.2.9-rt16.tar.xz


Enjoy,

	tglx

Index: linux-3.2/include/linux/seqlock.h
===================================================================
--- linux-3.2.orig/include/linux/seqlock.h
+++ linux-3.2/include/linux/seqlock.h
@@ -177,7 +177,7 @@ typedef struct {
 /*
  * Read side functions for starting and finalizing a read side section.
  */
-#ifndef CONFIG_PREEMPT_RT
+#ifndef CONFIG_PREEMPT_RT_FULL
 static inline unsigned read_seqbegin(const seqlock_t *sl)
 {
 	return read_seqcount_begin(&sl->seqcount);
Index: linux-3.2/kernel/cpu.c
===================================================================
--- linux-3.2.orig/kernel/cpu.c
+++ linux-3.2/kernel/cpu.c
@@ -59,16 +59,20 @@ static struct {
 	int refcount;
 } cpu_hotplug = {
 	.active_writer = NULL,
+#ifdef CONFIG_PREEMPT_RT_FULL
+	.lock = __SPIN_LOCK_UNLOCKED(cpu_hotplug.lock),
+#else
 	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
+#endif
 	.refcount = 0,
 };
 
 #ifdef CONFIG_PREEMPT_RT_FULL
-# define hotplug_lock() spin_lock(&cpu_hotplug.lock)
-# define hotplug_unlock() spin_unlock(&cpu_hotplug.lock)
+# define hotplug_lock() rt_spin_lock(&cpu_hotplug.lock)
+# define hotplug_unlock() rt_spin_unlock(&cpu_hotplug.lock)
 #else
 # define hotplug_lock() mutex_lock(&cpu_hotplug.lock)
-# define hotplug_lock() mutex_unlock(&cpu_hotplug.lock)
+# define hotplug_unlock() mutex_unlock(&cpu_hotplug.lock)
 #endif
 
 struct hotplug_pcp {
Index: linux-3.2/localversion-rt
===================================================================
--- linux-3.2.orig/localversion-rt
+++ linux-3.2/localversion-rt
@@ -1 +1 @@
--rt15
+-rt16
Index: linux-3.2/include/net/neighbour.h
===================================================================
--- linux-3.2.orig/include/net/neighbour.h
+++ linux-3.2/include/net/neighbour.h
@@ -385,7 +385,7 @@ struct neighbour_cb {
 
 #define NEIGH_CB(skb)	((struct neighbour_cb *)(skb)->cb)
 
-static inline void neigh_ha_snapshot(char *dst, const struct neighbour *n,
+static inline void neigh_ha_snapshot(char *dst, struct neighbour *n,
 				     const struct net_device *dev)
 {
 	unsigned int seq;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ANNOUNCE] 3.2.9-rt16
  2012-03-06 10:20 [ANNOUNCE] 3.2.9-rt16 Thomas Gleixner
@ 2012-03-06 13:50 ` Steven Rostedt
  2012-03-06 14:36   ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2012-03-06 13:50 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, linux-rt-users

On Tue, 2012-03-06 at 11:20 +0100, Thomas Gleixner wrote:
> Dear RT Folks,
> 
> I'm pleased to announce the 3.2.9-rt16 release.
> 
> Changes vs. 3.2.9-rt15:
> 
>   * cpu hotplug lock init fix [ Steven ]
> 
>   * seqlock fix CONFIG typo
> 

Note, yesterday while running some stress tests I hit a live lock here:

static inline struct dentry *dentry_kill(struct dentry *dentry, int ref)
        __releases(dentry->d_lock)
{
        struct inode *inode;
        struct dentry *parent;

        inode = dentry->d_inode;
        if (inode && !spin_trylock(&inode->i_lock)) {
relock:
                seq_spin_unlock(&dentry->d_lock);
                cpu_relax();
                return dentry; /* try again with same dentry */
        }
        if (IS_ROOT(dentry))
                parent = NULL;
        else
                parent = dentry->d_parent;
        if (parent && !seq_spin_trylock(&parent->d_lock)) {
                if (inode)
                        spin_unlock(&inode->i_lock);
                goto relock;
        }


When it fails to grab either the inode->i_lock or the parent->d_lock it
returns back to dput() and dput() will retry. We get into another one of
these cases where we can spin blocking the holder of the locks.

I experimented with adding a grab lock of the inode->i_lock or
parent->d_lock if they existed (required initializing parent to NULL),
which seemed to help a lot, but then eventually it locked up. As I'm not
sure its safe to grab them straight here even after we release the
dentry->d_lock. I'll have to enable full lockdep to see if this breaks
the ordering.

I haven't looked too deeply into this code yet, but I'm assuming that
dput() can be called where we can't just take the inode or parent lock?

-- Steve



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ANNOUNCE] 3.2.9-rt16
  2012-03-06 13:50 ` Steven Rostedt
@ 2012-03-06 14:36   ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2012-03-06 14:36 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, linux-rt-users

On Tue, 6 Mar 2012, Steven Rostedt wrote:

> Note, yesterday while running some stress tests I hit a live lock here:
> ... 
> When it fails to grab either the inode->i_lock or the parent->d_lock it
> returns back to dput() and dput() will retry. We get into another one of
> these cases where we can spin blocking the holder of the locks.

Nasty.
 
> I experimented with adding a grab lock of the inode->i_lock or
> parent->d_lock if they existed (required initializing parent to NULL),
> which seemed to help a lot, but then eventually it locked up. As I'm not
> sure its safe to grab them straight here even after we release the
> dentry->d_lock. I'll have to enable full lockdep to see if this breaks
> the ordering.
> 
> I haven't looked too deeply into this code yet, but I'm assuming that
> dput() can be called where we can't just take the inode or parent lock?

If you read the top of fs/dcache.c then you find an explanation of the
lock ordering. This code takes the locks in reverse order. That's why
it uses trylock.

Thanks,

	tglx
    

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-06 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 10:20 [ANNOUNCE] 3.2.9-rt16 Thomas Gleixner
2012-03-06 13:50 ` Steven Rostedt
2012-03-06 14:36   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox