Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e147ec8f18082efb700763bed4fe24f73ca50a2c
Commit:     e147ec8f18082efb700763bed4fe24f73ca50a2c
Parent:     435e0b2b165bcac86eeddf675383070f60587cbb
Author:     will schmidt <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 23:34:16 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Sat May 12 11:32:47 2007 +1000

    [POWERPC] Simplify smp_space_timers
    
    Greatly simplify the function smp_space_timers.
    
    The stolen time calculation (per comment within the code) doesn't need the
    half-jiffy stagger any more.  There isn't an issue with bouncing off global
    locks, so we really shouldn't need any sort of staggering at all.
    
    However, the last_jiffy value still needs to be set.   This removes the
    extra stagger logic, and just sets the values.
    
    This change should benefit applications that rely on barrier
    synchronization, and will help cut down OS jitter.
    
    Boot tested across the board (G5,power3,power4,power5,970mp blade).
    
    Signed-off-by: Will Schmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/time.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 7cedef8..2c8564d 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -711,30 +711,15 @@ void wakeup_decrementer(void)
 void __init smp_space_timers(unsigned int max_cpus)
 {
        int i;
-       unsigned long half = tb_ticks_per_jiffy / 2;
-       unsigned long offset = tb_ticks_per_jiffy / max_cpus;
        u64 previous_tb = per_cpu(last_jiffy, boot_cpuid);
 
        /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */
        previous_tb -= tb_ticks_per_jiffy;
-       /*
-        * The stolen time calculation for POWER5 shared-processor LPAR
-        * systems works better if the two threads' timebase interrupts
-        * are staggered by half a jiffy with respect to each other.
-        */
+
        for_each_possible_cpu(i) {
                if (i == boot_cpuid)
                        continue;
-               if (i == (boot_cpuid ^ 1))
-                       per_cpu(last_jiffy, i) =
-                               per_cpu(last_jiffy, boot_cpuid) - half;
-               else if (i & 1)
-                       per_cpu(last_jiffy, i) =
-                               per_cpu(last_jiffy, i ^ 1) + half;
-               else {
-                       previous_tb += offset;
-                       per_cpu(last_jiffy, i) = previous_tb;
-               }
+               per_cpu(last_jiffy, i) = previous_tb;
        }
 }
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to