[kernel] r18881 - in dists/sid/linux-2.6/debian: . patches/features/all/rt patches/series
Uwe Kleine-König
ukleinek-guest at alioth.debian.org
Sat Mar 24 00:48:41 UTC 2012
Author: ukleinek-guest
Date: Sat Mar 24 00:48:38 2012
New Revision: 18881
Log:
[rt] bump version to 3.2.12-rt22
This undoes the locking change to struct fs, so the corresponding fixups
can be dropped, too.
Added:
dists/sid/linux-2.6/debian/patches/features/all/rt/vfs-fstruct-move-code-out-of-seqcount-write-sections.patch
Deleted:
dists/sid/linux-2.6/debian/patches/features/all/rt/fix-rt+link-creation-restrictions
dists/sid/linux-2.6/debian/patches/features/all/rt/fs-dentry-use-seqlock.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/fs-more-cpu-chill-fixups.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/fs-protect-opencoded-isize-seqcount.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/fs-struct-use-seqlock.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/net-u64-stat-protect-seqcount.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/seqlock-provide-seq-spin-lock.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/staging-pohmelfs-convert-struct-fs-lock-usage-to-.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/localversion.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch
dists/sid/linux-2.6/debian/patches/features/all/rt/series
dists/sid/linux-2.6/debian/patches/series/base-extra
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/changelog Sat Mar 24 00:48:38 2012 (r18881)
@@ -1,7 +1,11 @@
linux-2.6 (3.2.12-2) UNRELEASED; urgency=low
+ [ Ben Hutchings ]
* kbuild: do not check for ancient modutils tools
+ [ Uwe Kleine-König ]
+ * [rt] bump version to 3.2.12-rt22
+
-- Ben Hutchings <ben at decadent.org.uk> Wed, 21 Mar 2012 03:15:13 +0000
linux-2.6 (3.2.12-1) unstable; urgency=high
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch Sat Mar 24 00:48:38 2012 (r18881)
@@ -12,20 +12,20 @@
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
---
- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 ++-----
+ drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 6 +-----
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 3 +--
drivers/net/ethernet/chelsio/cxgb/sge.c | 3 +--
drivers/net/ethernet/neterion/s2io.c | 7 +------
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 7 +++----
drivers/net/ethernet/tehuti/tehuti.c | 9 ++-------
drivers/net/rionet.c | 6 +-----
- 7 files changed, 11 insertions(+), 31 deletions(-)
+ 7 files changed, 10 insertions(+), 31 deletions(-)
Index: linux-3.2/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
===================================================================
--- linux-3.2.orig/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ linux-3.2/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
-@@ -2236,11 +2236,8 @@ static netdev_tx_t atl1c_xmit_frame(stru
+@@ -2236,11 +2236,7 @@ static netdev_tx_t atl1c_xmit_frame(stru
}
tpd_req = atl1c_cal_tpd_req(skb);
@@ -35,7 +35,6 @@
- return NETDEV_TX_LOCKED;
- }
+ spin_lock_irqsave(&adapter->tx_lock, flags);
-+
if (atl1c_tpd_avail(adapter, type) < tpd_req) {
/* no enough descriptor, just stop queue */
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch Sat Mar 24 00:48:38 2012 (r18881)
@@ -12,7 +12,8 @@
fs/autofs4/autofs_i.h | 1 +
fs/autofs4/expire.c | 2 +-
fs/dcache.c | 7 ++++---
- 3 files changed, 6 insertions(+), 4 deletions(-)
+ fs/namespace.c | 3 ++-
+ 4 files changed, 8 insertions(+), 5 deletions(-)
Index: linux-3.2/fs/autofs4/autofs_i.h
===================================================================
@@ -32,13 +33,13 @@
+++ linux-3.2/fs/autofs4/expire.c
@@ -170,7 +170,7 @@ again:
parent = p->d_parent;
- if (!seq_spin_trylock(&parent->d_lock)) {
- seq_spin_unlock(&p->d_lock);
+ if (!spin_trylock(&parent->d_lock)) {
+ spin_unlock(&p->d_lock);
- cpu_relax();
+ cpu_chill();
goto relock;
}
- seq_spin_unlock(&p->d_lock);
+ spin_unlock(&p->d_lock);
Index: linux-3.2/fs/dcache.c
===================================================================
--- linux-3.2.orig/fs/dcache.c
@@ -54,7 +55,7 @@
@@ -410,7 +411,7 @@ static inline struct dentry *dentry_kill
if (inode && !spin_trylock(&inode->i_lock)) {
relock:
- seq_spin_unlock(&dentry->d_lock);
+ spin_unlock(&dentry->d_lock);
- cpu_relax();
+ cpu_chill();
return dentry; /* try again with same dentry */
@@ -62,19 +63,40 @@
if (IS_ROOT(dentry))
@@ -796,7 +797,7 @@ relock:
- if (!seq_spin_trylock(&dentry->d_lock)) {
+ if (!spin_trylock(&dentry->d_lock)) {
spin_unlock(&dcache_lru_lock);
- cpu_relax();
+ cpu_chill();
goto relock;
}
-@@ -1974,7 +1975,7 @@ again:
+@@ -1975,7 +1976,7 @@ again:
if (dentry->d_count == 1) {
if (inode && !spin_trylock(&inode->i_lock)) {
- seq_spin_unlock(&dentry->d_lock);
+ spin_unlock(&dentry->d_lock);
- cpu_relax();
+ cpu_chill();
goto again;
}
dentry->d_flags &= ~DCACHE_CANT_MOUNT;
+Index: linux-3.2/fs/namespace.c
+===================================================================
+--- linux-3.2.orig/fs/namespace.c
++++ linux-3.2/fs/namespace.c
+@@ -31,6 +31,7 @@
+ #include <linux/idr.h>
+ #include <linux/fs_struct.h>
+ #include <linux/fsnotify.h>
++#include <linux/delay.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+ #include "pnode.h"
+@@ -346,7 +347,7 @@ int mnt_want_write(struct vfsmount *mnt)
+ */
+ while (mnt->mnt_flags & MNT_WRITE_HOLD) {
+ preempt_enable();
+- cpu_relax();
++ cpu_chill();
+ preempt_disable();
+ }
+ /*
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/localversion.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/localversion.patch Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/localversion.patch Sat Mar 24 00:48:38 2012 (r18881)
@@ -14,4 +14,4 @@
--- /dev/null
+++ linux-3.2/localversion-rt
@@ -0,0 +1 @@
-+-rt20
++-rt22
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch Sat Mar 24 00:48:38 2012 (r18881)
@@ -9,19 +9,56 @@
eventually boosts the writer. This way the writer can proceed and
endless spinning is prevented.
+For seqcount writers we disable preemption over the update code
+path. Thaanks to Al Viro for distangling some VFS code to make that
+possible.
+
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Cc: stable-rt at vger.kernel.org
---
- include/linux/seqlock.h | 23 +++++++++++++++++++++++
- include/net/neighbour.h | 2 +-
- 2 files changed, 24 insertions(+), 1 deletion(-)
+ include/linux/seqlock.h | 55 +++++++++++++++++++++++++++++++++++++++---------
+ include/net/neighbour.h | 2 -
+ 2 files changed, 46 insertions(+), 11 deletions(-)
Index: linux-3.2/include/linux/seqlock.h
===================================================================
--- linux-3.2.orig/include/linux/seqlock.h
+++ linux-3.2/include/linux/seqlock.h
-@@ -177,10 +177,33 @@ typedef struct {
+@@ -125,18 +125,30 @@ static inline int read_seqcount_retry(co
+ * Sequence counter only version assumes that callers are using their
+ * own mutexing.
+ */
+-static inline void write_seqcount_begin(seqcount_t *s)
++static inline void __write_seqcount_begin(seqcount_t *s)
+ {
+ s->sequence++;
+ smp_wmb();
+ }
+
+-static inline void write_seqcount_end(seqcount_t *s)
++static inline void write_seqcount_begin(seqcount_t *s)
++{
++ preempt_disable_rt();
++ __write_seqcount_begin(s);
++}
++
++static inline void __write_seqcount_end(seqcount_t *s)
+ {
+ smp_wmb();
+ s->sequence++;
+ }
+
++static inline void write_seqcount_end(seqcount_t *s)
++{
++ __write_seqcount_end(s);
++ preempt_enable_rt();
++}
++
+ /**
+ * write_seqcount_barrier - invalidate in-progress read-side seq operations
+ * @s: pointer to seqcount_t
+@@ -177,10 +189,33 @@ typedef struct {
/*
* Read side functions for starting and finalizing a read side section.
*/
@@ -55,6 +92,67 @@
static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start)
{
+@@ -195,36 +230,36 @@ static inline unsigned read_seqretry(con
+ static inline void write_seqlock(seqlock_t *sl)
+ {
+ spin_lock(&sl->lock);
+- write_seqcount_begin(&sl->seqcount);
++ __write_seqcount_begin(&sl->seqcount);
+ }
+
+ static inline void write_sequnlock(seqlock_t *sl)
+ {
+- write_seqcount_end(&sl->seqcount);
++ __write_seqcount_end(&sl->seqcount);
+ spin_unlock(&sl->lock);
+ }
+
+ static inline void write_seqlock_bh(seqlock_t *sl)
+ {
+ spin_lock_bh(&sl->lock);
+- write_seqcount_begin(&sl->seqcount);
++ __write_seqcount_begin(&sl->seqcount);
+ }
+
+ static inline void write_sequnlock_bh(seqlock_t *sl)
+ {
+- write_seqcount_end(&sl->seqcount);
++ __write_seqcount_end(&sl->seqcount);
+ spin_unlock_bh(&sl->lock);
+ }
+
+ static inline void write_seqlock_irq(seqlock_t *sl)
+ {
+ spin_lock_irq(&sl->lock);
+- write_seqcount_begin(&sl->seqcount);
++ __write_seqcount_begin(&sl->seqcount);
+ }
+
+ static inline void write_sequnlock_irq(seqlock_t *sl)
+ {
+- write_seqcount_end(&sl->seqcount);
++ __write_seqcount_end(&sl->seqcount);
+ spin_unlock_irq(&sl->lock);
+ }
+
+@@ -233,7 +268,7 @@ static inline unsigned long __write_seql
+ unsigned long flags;
+
+ spin_lock_irqsave(&sl->lock, flags);
+- write_seqcount_begin(&sl->seqcount);
++ __write_seqcount_begin(&sl->seqcount);
+ return flags;
+ }
+
+@@ -243,7 +278,7 @@ static inline unsigned long __write_seql
+ static inline void
+ write_sequnlock_irqrestore(seqlock_t *sl, unsigned long flags)
+ {
+- write_seqcount_end(&sl->seqcount);
++ __write_seqcount_end(&sl->seqcount);
+ spin_unlock_irqrestore(&sl->lock, flags);
+ }
+
Index: linux-3.2/include/net/neighbour.h
===================================================================
--- linux-3.2.orig/include/net/neighbour.h
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/series
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/series Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/series Sat Mar 24 00:48:38 2012 (r18881)
@@ -5,7 +5,6 @@
############################################################
# UPSTREAM changes queued for 3.3 or 3.2
############################################################
-x88-derandom-tsc-delay-64-bit.patch
x86_64-patch-for-idle-notifiers.patch
re-possible-slab-deadlock-while-doing-ifenslave-1.patch
@@ -106,9 +105,12 @@
# SEQLOCK
seqlock-remove-unused-functions.patch
seqlock-use-seqcount.patch
-seqlock-provide-seq-spin-lock.patch
-fs-struct-use-seqlock.patch
-fs-dentry-use-seqlock.patch
+#seqlock-provide-seq-spin-lock.patch
+#fs-struct-use-seqlock.patch
+#fs-dentry-use-seqlock.patch
+
+# VFS. Al Viro provided this so we can deal with the seqcount simpler
+vfs-fstruct-move-code-out-of-seqcount-write-sections.patch
# RAW SPINLOCKS
timekeeping-split-xtime-lock.patch
@@ -578,8 +580,8 @@
# Various fixes - fold them back
seqlock-prevent-rt-starvation.patch
-fs-protect-opencoded-isize-seqcount.patch
-net-u64-stat-protect-seqcount.patch
+#fs-protect-opencoded-isize-seqcount.patch
+#net-u64-stat-protect-seqcount.patch
rfc-timer-fix-hotplug-for-rt.patch
rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch
rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch
@@ -592,7 +594,6 @@
rt-introduce-cpu-chill.patch
fs-dcache-use-cpu-chill-in-trylock-loops.patch
-fs-more-cpu-chill-fixups.patch
net-use-cpu-chill.patch
# Enable full RT
Added: dists/sid/linux-2.6/debian/patches/features/all/rt/vfs-fstruct-move-code-out-of-seqcount-write-sections.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/vfs-fstruct-move-code-out-of-seqcount-write-sections.patch Sat Mar 24 00:48:38 2012 (r18881)
@@ -0,0 +1,85 @@
+Subject: vfs: fs_struct: Move code out of seqcount write sections
+From: Al Viro <viro at ZenIV.linux.org.uk>
+Date: Thu, 15 Mar 2012 18:39:40 +0000
+
+RT cannot disable preemption in the seqcount write sections due to
+functions called which take "sleeping" spinlocks.
+
+Move the code out of those sections. It does not need to be there.
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+
+diff --git a/fs/fs_struct.c b/fs/fs_struct.c
+index 78b519c..f5818c4 100644
+--- a/fs/fs_struct.c
++++ b/fs/fs_struct.c
+@@ -26,11 +26,11 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
+ {
+ struct path old_root;
+
++ path_get_longterm(path);
+ spin_lock(&fs->lock);
+ write_seqcount_begin(&fs->seq);
+ old_root = fs->root;
+ fs->root = *path;
+- path_get_longterm(path);
+ write_seqcount_end(&fs->seq);
+ spin_unlock(&fs->lock);
+ if (old_root.dentry)
+@@ -45,11 +45,11 @@ void set_fs_pwd(struct fs_struct *fs, struct path *path)
+ {
+ struct path old_pwd;
+
++ path_get_longterm(path);
+ spin_lock(&fs->lock);
+ write_seqcount_begin(&fs->seq);
+ old_pwd = fs->pwd;
+ fs->pwd = *path;
+- path_get_longterm(path);
+ write_seqcount_end(&fs->seq);
+ spin_unlock(&fs->lock);
+
+@@ -57,6 +57,14 @@ void set_fs_pwd(struct fs_struct *fs, struct path *path)
+ path_put_longterm(&old_pwd);
+ }
+
++static inline int replace_path(struct path *p, const struct path *old, const struct path *new)
++{
++ if (likely(p->dentry != old->dentry || p->mnt != old->mnt))
++ return 0;
++ *p = *new;
++ return 1;
++}
++
+ void chroot_fs_refs(struct path *old_root, struct path *new_root)
+ {
+ struct task_struct *g, *p;
+@@ -68,21 +76,16 @@ void chroot_fs_refs(struct path *old_root, struct path *new_root)
+ task_lock(p);
+ fs = p->fs;
+ if (fs) {
++ int hits = 0;
+ spin_lock(&fs->lock);
+ write_seqcount_begin(&fs->seq);
+- if (fs->root.dentry == old_root->dentry
+- && fs->root.mnt == old_root->mnt) {
+- path_get_longterm(new_root);
+- fs->root = *new_root;
++ hits += replace_path(&fs->root, old_root, new_root);
++ hits += replace_path(&fs->pwd, old_root, new_root);
++ write_seqcount_end(&fs->seq);
++ while (hits--) {
+ count++;
+- }
+- if (fs->pwd.dentry == old_root->dentry
+- && fs->pwd.mnt == old_root->mnt) {
+ path_get_longterm(new_root);
+- fs->pwd = *new_root;
+- count++;
+ }
+- write_seqcount_end(&fs->seq);
+ spin_unlock(&fs->lock);
+ }
+ task_unlock(p);
+
+
Modified: dists/sid/linux-2.6/debian/patches/series/base-extra
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/base-extra Thu Mar 22 15:44:58 2012 (r18880)
+++ dists/sid/linux-2.6/debian/patches/series/base-extra Sat Mar 24 00:48:38 2012 (r18881)
@@ -18,9 +18,7 @@
+ features/all/rt/ia64-vdso-use-seqcount.patch featureset=rt
+ features/all/rt/seqlock-remove-unused-functions.patch featureset=rt
+ features/all/rt/seqlock-use-seqcount.patch featureset=rt
-+ features/all/rt/seqlock-provide-seq-spin-lock.patch featureset=rt
-+ features/all/rt/fs-struct-use-seqlock.patch featureset=rt
-+ features/all/rt/fs-dentry-use-seqlock.patch featureset=rt
++ features/all/rt/vfs-fstruct-move-code-out-of-seqcount-write-sections.patch featureset=rt
+ features/all/rt/timekeeping-split-xtime-lock.patch featureset=rt
+ features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch featureset=rt
+ features/all/rt/mm-memcg-shorten-preempt-disabled-section-around-event-checks.patch featureset=rt
@@ -252,8 +250,6 @@
+ features/all/rt/dm-make-rt-aware.patch featureset=rt
+ features/all/rt/cpumask-disable-offstack-on-rt.patch featureset=rt
+ features/all/rt/seqlock-prevent-rt-starvation.patch featureset=rt
-+ features/all/rt/fs-protect-opencoded-isize-seqcount.patch featureset=rt
-+ features/all/rt/net-u64-stat-protect-seqcount.patch featureset=rt
+ features/all/rt/rfc-timer-fix-hotplug-for-rt.patch featureset=rt
+ features/all/rt/rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch featureset=rt
+ features/all/rt/rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch featureset=rt
@@ -263,9 +259,6 @@
+ features/all/rt/softirq-preempt-fix-3-re.txt featureset=rt
+ features/all/rt/rt-introduce-cpu-chill.patch featureset=rt
+ features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch featureset=rt
-+ features/all/rt/fs-more-cpu-chill-fixups.patch featureset=rt
+ features/all/rt/net-use-cpu-chill.patch featureset=rt
+ features/all/rt/kconfig-disable-a-few-options-rt.patch featureset=rt
+ features/all/rt/kconfig-preempt-rt-full.patch featureset=rt
-+ features/all/rt/fix-rt+link-creation-restrictions featureset=rt
-+ features/all/rt/staging-pohmelfs-convert-struct-fs-lock-usage-to-.patch featureset=rt
More information about the Kernel-svn-changes
mailing list