[kernel] r19983 - dists/sid/linux/debian/patches/features/all/rt

Ben Hutchings benh at alioth.debian.org
Sun Apr 28 19:10:50 UTC 2013


Author: benh
Date: Sun Apr 28 19:10:49 2013
New Revision: 19983

Log:
[rt] Resolve conflicts with scheduler fixes in 3.2.44

Modified:
   dists/sid/linux/debian/patches/features/all/rt/0007-sched-Distangle-worker-accounting-from-rq-3Elock.patch
   dists/sid/linux/debian/patches/features/all/rt/0045-preempt-mark-legitimated-no-resched-sites.patch.patch
   dists/sid/linux/debian/patches/features/all/rt/0256-softirq-Check-preemption-after-reenabling-interrupts.patch

Modified: dists/sid/linux/debian/patches/features/all/rt/0007-sched-Distangle-worker-accounting-from-rq-3Elock.patch
==============================================================================
--- dists/sid/linux/debian/patches/features/all/rt/0007-sched-Distangle-worker-accounting-from-rq-3Elock.patch	Sun Apr 28 19:01:13 2013	(r19982)
+++ dists/sid/linux/debian/patches/features/all/rt/0007-sched-Distangle-worker-accounting-from-rq-3Elock.patch	Sun Apr 28 19:10:49 2013	(r19983)
@@ -23,17 +23,17 @@
 Cc: Linus Torvalds <torvalds at linux-foundation.org>
 Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+[bwh: Adjust context to apply after commit 383efcd00053 'sched: Convert
+ BUG_ON()s in try_to_wake_up_local() to WARN_ON_ONCE()s']
 ---
  kernel/sched.c           |   66 +++++++++++----------------------------------
  kernel/workqueue.c       |   67 +++++++++++++++++++++-------------------------
  kernel/workqueue_sched.h |    5 ++--
  3 files changed, 47 insertions(+), 91 deletions(-)
 
-diff --git a/kernel/sched.c b/kernel/sched.c
-index eeeec4e..561aa10 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
-@@ -2640,10 +2640,6 @@ static void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags)
+@@ -2640,10 +2640,6 @@ static void ttwu_activate(struct rq *rq,
  {
  	activate_task(rq, p, en_flags);
  	p->on_rq = 1;
@@ -44,7 +44,7 @@
  }
  
  /*
-@@ -2878,40 +2874,6 @@ out:
+@@ -2878,42 +2874,6 @@ out:
  }
  
  /**
@@ -59,8 +59,10 @@
 -{
 -	struct rq *rq = task_rq(p);
 -
--	BUG_ON(rq != this_rq());
--	BUG_ON(p == current);
+-	if (WARN_ON_ONCE(rq != this_rq()) ||
+-	    WARN_ON_ONCE(p == current))
+-		return;
+-
 -	lockdep_assert_held(&rq->lock);
 -
 -	if (!raw_spin_trylock(&p->pi_lock)) {
@@ -85,7 +87,7 @@
   * wake_up_process - Wake up a specific process
   * @p: The process to be woken up.
   *
-@@ -4613,19 +4575,6 @@ need_resched:
+@@ -4615,19 +4575,6 @@ need_resched:
  		} else {
  			deactivate_task(rq, prev, DEQUEUE_SLEEP);
  			prev->on_rq = 0;
@@ -105,7 +107,7 @@
  		}
  		switch_count = &prev->nvcsw;
  	}
-@@ -4668,6 +4617,14 @@ static inline void sched_submit_work(struct task_struct *tsk)
+@@ -4670,6 +4617,14 @@ static inline void sched_submit_work(str
  {
  	if (!tsk->state)
  		return;
@@ -120,7 +122,7 @@
  	/*
  	 * If we are going to sleep and we have plugged IO queued,
  	 * make sure to submit it to avoid deadlocks.
-@@ -4676,12 +4633,19 @@ static inline void sched_submit_work(struct task_struct *tsk)
+@@ -4678,12 +4633,19 @@ static inline void sched_submit_work(str
  		blk_schedule_flush_plug(tsk);
  }
  
@@ -140,8 +142,6 @@
  }
  EXPORT_SYMBOL(schedule);
  
-diff --git a/kernel/workqueue.c b/kernel/workqueue.c
-index d2fce7c..205bdb0 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -138,6 +138,7 @@ struct worker {
@@ -152,7 +152,7 @@
  };
  
  /*
-@@ -661,66 +662,58 @@ static void wake_up_worker(struct global_cwq *gcwq)
+@@ -661,66 +662,58 @@ static void wake_up_worker(struct global
  }
  
  /**
@@ -213,14 +213,14 @@
  	if (worker->flags & WORKER_NOT_RUNNING)
 -		return NULL;
 +		return;
-+
-+	if (WARN_ON_ONCE(worker->sleeping))
-+		return;
  
 -	/* this can only happen on the local cpu */
 -	BUG_ON(cpu != raw_smp_processor_id());
-+	worker->sleeping = 1;
++	if (WARN_ON_ONCE(worker->sleeping))
++		return;
  
++	worker->sleeping = 1;
++
 +	cpu = smp_processor_id();
 +	gcwq = get_gcwq(cpu);
 +	spin_lock_irq(&gcwq->lock);
@@ -248,8 +248,6 @@
  }
  
  /**
-diff --git a/kernel/workqueue_sched.h b/kernel/workqueue_sched.h
-index 2d10fc9..3bf73e2 100644
 --- a/kernel/workqueue_sched.h
 +++ b/kernel/workqueue_sched.h
 @@ -4,6 +4,5 @@

Modified: dists/sid/linux/debian/patches/features/all/rt/0045-preempt-mark-legitimated-no-resched-sites.patch.patch
==============================================================================
--- dists/sid/linux/debian/patches/features/all/rt/0045-preempt-mark-legitimated-no-resched-sites.patch.patch	Sun Apr 28 19:01:13 2013	(r19982)
+++ dists/sid/linux/debian/patches/features/all/rt/0045-preempt-mark-legitimated-no-resched-sites.patch.patch	Sun Apr 28 19:10:49 2013	(r19983)
@@ -4,6 +4,8 @@
 Subject: [PATCH 045/303] preempt-mark-legitimated-no-resched-sites.patch
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+[bwh: Adjust to apply after commit 386afc91144b 'spinlocks and preemption
+ points need to be at least compiler barriers']
 ---
  arch/powerpc/kernel/idle.c     |    2 +-
  arch/sparc/kernel/process_64.c |    2 +-
@@ -12,8 +14,6 @@
  kernel/softirq.c               |    4 ++--
  5 files changed, 11 insertions(+), 8 deletions(-)
 
-diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
-index f46dae5..5d70d10 100644
 --- a/arch/powerpc/kernel/idle.c
 +++ b/arch/powerpc/kernel/idle.c
 @@ -95,7 +95,7 @@ void cpu_idle(void)
@@ -25,8 +25,6 @@
  			cpu_die();
  		}
  		schedule_preempt_disabled();
-diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
-index 8ba0dbe..86fe09a 100644
 --- a/arch/sparc/kernel/process_64.c
 +++ b/arch/sparc/kernel/process_64.c
 @@ -104,7 +104,7 @@ void cpu_idle(void)
@@ -38,8 +36,6 @@
  			cpu_play_dead();
  		}
  #endif
-diff --git a/include/linux/preempt.h b/include/linux/preempt.h
-index 58969b2..227b0f5 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -48,12 +48,14 @@ do { \
@@ -58,16 +54,14 @@
  #define preempt_enable() \
  do { \
  	preempt_enable_no_resched(); \
-@@ -92,6 +94,7 @@ do { \
- #else /* !CONFIG_PREEMPT_COUNT */
- 
- #define preempt_disable()		do { } while (0)
-+#define __preempt_enable_no_resched()	do { } while (0)
- #define preempt_enable_no_resched()	do { } while (0)
- #define preempt_enable()		do { } while (0)
+@@ -98,6 +100,7 @@ do { \
+  * region.
+  */
+ #define preempt_disable()		barrier()
++#define __preempt_enable_no_resched()	barrier()
+ #define preempt_enable_no_resched()	barrier()
+ #define preempt_enable()		barrier()
  
-diff --git a/kernel/sched.c b/kernel/sched.c
-index 83f1c88..dbc3927 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
 @@ -4608,7 +4608,7 @@ need_resched:
@@ -97,8 +91,6 @@
  
  	schedule();
  
-diff --git a/kernel/softirq.c b/kernel/softirq.c
-index c9da2c8..a8becbf 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -353,7 +353,7 @@ void irq_exit(void)
@@ -110,7 +102,7 @@
  }
  
  /*
-@@ -759,7 +759,7 @@ static int run_ksoftirqd(void * __bind_cpu)
+@@ -759,7 +759,7 @@ static int run_ksoftirqd(void * __bind_c
  			if (local_softirq_pending())
  				__do_softirq();
  			local_irq_enable();

Modified: dists/sid/linux/debian/patches/features/all/rt/0256-softirq-Check-preemption-after-reenabling-interrupts.patch
==============================================================================
--- dists/sid/linux/debian/patches/features/all/rt/0256-softirq-Check-preemption-after-reenabling-interrupts.patch	Sun Apr 28 19:01:13 2013	(r19982)
+++ dists/sid/linux/debian/patches/features/all/rt/0256-softirq-Check-preemption-after-reenabling-interrupts.patch	Sun Apr 28 19:10:49 2013	(r19983)
@@ -15,6 +15,8 @@
 Reported-by: Carsten Emde <cbe at osadl.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Cc: stable-rt at vger.kernel.org
+[bwh: Adjust to apply after commit 386afc91144b 'spinlocks and preemption
+ points need to be at least compiler barriers']
 ---
  block/blk-iopoll.c      |    3 +++
  block/blk-softirq.c     |    3 +++
@@ -22,11 +24,9 @@
  net/core/dev.c          |    6 ++++++
  4 files changed, 15 insertions(+)
 
-diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
-index 58916af..f7ca9b4 100644
 --- a/block/blk-iopoll.c
 +++ b/block/blk-iopoll.c
-@@ -38,6 +38,7 @@ void blk_iopoll_sched(struct blk_iopoll *iop)
+@@ -38,6 +38,7 @@ void blk_iopoll_sched(struct blk_iopoll
  	list_add_tail(&iop->list, &__get_cpu_var(blk_cpu_iopoll));
  	__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
  	local_irq_restore(flags);
@@ -34,7 +34,7 @@
  }
  EXPORT_SYMBOL(blk_iopoll_sched);
  
-@@ -135,6 +136,7 @@ static void blk_iopoll_softirq(struct softirq_action *h)
+@@ -135,6 +136,7 @@ static void blk_iopoll_softirq(struct so
  		__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
  
  	local_irq_enable();
@@ -42,7 +42,7 @@
  }
  
  /**
-@@ -204,6 +206,7 @@ static int __cpuinit blk_iopoll_cpu_notify(struct notifier_block *self,
+@@ -204,6 +206,7 @@ static int __cpuinit blk_iopoll_cpu_noti
  				 &__get_cpu_var(blk_cpu_iopoll));
  		__raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ);
  		local_irq_enable();
@@ -50,8 +50,6 @@
  	}
  
  	return NOTIFY_OK;
-diff --git a/block/blk-softirq.c b/block/blk-softirq.c
-index 1366a89..60a88ab 100644
 --- a/block/blk-softirq.c
 +++ b/block/blk-softirq.c
 @@ -50,6 +50,7 @@ static void trigger_softirq(void *data)
@@ -62,7 +60,7 @@
  }
  
  /*
-@@ -92,6 +93,7 @@ static int __cpuinit blk_cpu_notify(struct notifier_block *self,
+@@ -92,6 +93,7 @@ static int __cpuinit blk_cpu_notify(stru
  				 &__get_cpu_var(blk_cpu_done));
  		raise_softirq_irqoff(BLOCK_SOFTIRQ);
  		local_irq_enable();
@@ -78,34 +76,30 @@
  }
  
  /**
-diff --git a/include/linux/preempt.h b/include/linux/preempt.h
-index 6450c01..58d8982 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -56,8 +56,10 @@ do { \
  
  #ifndef CONFIG_PREEMPT_RT_BASE
  # define preempt_enable_no_resched()	__preempt_enable_no_resched()
-+# define preempt_check_resched_rt()	do { } while (0)
++# define preempt_check_resched_rt()	barrier()
  #else
  # define preempt_enable_no_resched()	preempt_enable()
 +# define preempt_check_resched_rt()	preempt_check_resched()
  #endif
  
  #define preempt_enable() \
-@@ -105,6 +107,7 @@ do { \
- #define preempt_disable_notrace()		do { } while (0)
- #define preempt_enable_no_resched_notrace()	do { } while (0)
- #define preempt_enable_notrace()		do { } while (0)
-+#define preempt_check_resched_rt()	do { } while (0)
+@@ -111,6 +113,7 @@ do { \
+ #define preempt_disable_notrace()		barrier()
+ #define preempt_enable_no_resched_notrace()	barrier()
+ #define preempt_enable_notrace()		barrier()
++#define preempt_check_resched_rt()	barrier()
  
  #endif /* CONFIG_PREEMPT_COUNT */
  
-diff --git a/net/core/dev.c b/net/core/dev.c
-index e1753dd..d9cf162 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -1819,6 +1819,7 @@ static inline void __netif_reschedule(struct Qdisc *q)
+@@ -1819,6 +1819,7 @@ static inline void __netif_reschedule(st
  	sd->output_queue_tailp = &q->next_sched;
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_restore(flags);
@@ -113,7 +107,7 @@
  }
  
  void __netif_schedule(struct Qdisc *q)
-@@ -1840,6 +1841,7 @@ void dev_kfree_skb_irq(struct sk_buff *skb)
+@@ -1840,6 +1841,7 @@ void dev_kfree_skb_irq(struct sk_buff *s
  		sd->completion_queue = skb;
  		raise_softirq_irqoff(NET_TX_SOFTIRQ);
  		local_irq_restore(flags);
@@ -129,7 +123,7 @@
  
  	atomic_long_inc(&skb->dev->rx_dropped);
  	kfree_skb(skb);
-@@ -3796,6 +3799,7 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd)
+@@ -3796,6 +3799,7 @@ static void net_rps_action_and_irq_enabl
  	} else
  #endif
  		local_irq_enable();
@@ -137,7 +131,7 @@
  }
  
  static int process_backlog(struct napi_struct *napi, int quota)
-@@ -3868,6 +3872,7 @@ void __napi_schedule(struct napi_struct *n)
+@@ -3868,6 +3872,7 @@ void __napi_schedule(struct napi_struct
  	local_irq_save(flags);
  	____napi_schedule(&__get_cpu_var(softnet_data), n);
  	local_irq_restore(flags);
@@ -145,7 +139,7 @@
  }
  EXPORT_SYMBOL(__napi_schedule);
  
-@@ -6379,6 +6384,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
+@@ -6382,6 +6387,7 @@ static int dev_cpu_callback(struct notif
  
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();



More information about the Kernel-svn-changes mailing list