SOURCES: kernel-desktop-preempt-rt.patch - fixes for suspend2-patc...

sparky sparky at pld-linux.org
Mon Nov 6 21:35:40 CET 2006


Author: sparky                       Date: Mon Nov  6 20:35:40 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixes for suspend2-patched kernel

---- Files affected:
SOURCES:
   kernel-desktop-preempt-rt.patch (1.18 -> 1.19) 

---- Diffs:

================================================================
Index: SOURCES/kernel-desktop-preempt-rt.patch
diff -u SOURCES/kernel-desktop-preempt-rt.patch:1.18 SOURCES/kernel-desktop-preempt-rt.patch:1.19
--- SOURCES/kernel-desktop-preempt-rt.patch:1.18	Mon Nov  6 21:07:37 2006
+++ SOURCES/kernel-desktop-preempt-rt.patch	Mon Nov  6 21:35:34 2006
@@ -14245,10 +14245,10 @@
 -#endif
 -	} else
 -		vxtime.last_tsc = get_cycles_sync();
--	write_sequnlock_irqrestore(&xtime_lock,flags);
 -	jiffies += sleep_length;
 -	wall_jiffies += sleep_length;
 -	monotonic_base += sleep_length * (NSEC_PER_SEC/HZ);
+-	write_sequnlock_irqrestore(&xtime_lock,flags);
  	touch_softlockup_watchdog();
  	return 0;
  }
@@ -47926,12 +47926,13 @@
 ===================================================================
 --- linux.orig/kernel/timer.c
 +++ linux/kernel/timer.c
-@@ -33,7 +33,9 @@
+@@ -33,8 +33,10 @@
  #include <linux/posix-timers.h>
  #include <linux/cpu.h>
  #include <linux/syscalls.h>
 +#include <linux/kallsyms.h>
  #include <linux/delay.h>
+ #include <linux/freezer.h>
 +#include <linux/kallsyms.h>
  
  #include <asm/uaccess.h>
@@ -48936,16 +48937,28 @@
  /*
   * calc_load - given tick count, update the avenrun load estimates.
   * This is called while holding a write_lock on xtime_lock.
-@@ -1217,42 +1279,31 @@ static inline void calc_load(unsigned lo
+@@ -1217,52 +1279,33 @@ static inline void calc_load(unsigned lo
  	unsigned long active_tasks; /* fixed-point */
  	static int count = LOAD_FREQ;
  
 -	count -= ticks;
 -	if (count < 0) {
 -		count += LOAD_FREQ;
+-
+-		/* Suspend2 does a lot of work (pagecache I/O) before
+-		 * and after the atomic copy. If we let the load average
+-		 * be updated while suspending, it will be very high post
+-		 * resume. Processes such as some MTAs that stop work
+-		 * while the average is high will be unnecessarily disrupted.
+-		 */
+-		if (freezer_is_on())
+-			return;
+-
 -		active_tasks = count_active_tasks();
 +	active_tasks = count_active_tasks();
 +	for (count -= ticks; count < 0; count += LOAD_FREQ) {
++		if (freezer_is_on())
++			return;
  		CALC_LOAD(avenrun[0], EXP_1, active_tasks);
  		CALC_LOAD(avenrun[1], EXP_5, active_tasks);
  		CALC_LOAD(avenrun[2], EXP_15, active_tasks);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/kernel-desktop-preempt-rt.patch?r1=1.18&r2=1.19&f=u



More information about the pld-cvs-commit mailing list