1. 14 Jul, 2008 2 commits
  2. 13 Jul, 2008 7 commits
  3. 12 Jul, 2008 17 commits
  4. 11 Jul, 2008 14 commits
    • Mark Rustad's avatar
      [PATCH] IPMI: return correct value from ipmi_write · 3976df9b
      Mark Rustad authored
      This patch corrects the handling of write operations to the IPMI watchdog
      to work as intended by returning the number of characters actually
      processed. Without this patch, an "echo V >/dev/watchdog" enables the
      watchdog if IPMI is providing the watchdog function.
      Signed-off-by: default avatarMark Rustad <MRustad@gmail.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      3976df9b
    • Brian King's avatar
      [SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices · 0ce3a7e5
      Brian King authored
      Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices.
      An oops occurs if userspace attempts to send the command. Since hald
      issues the command, ensure we fail the ioctl in ipr. This is a
      temporary solution to the oops. Once the ipr libata EH conversion
      is upstream, ipr will fully support HDIO_GET_IDENTITY.
      Tested-by: default avatarMilton Miller <miltonm@bga.com>
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      0ce3a7e5
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 4d727a78
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        libata-acpi: don't call sleeping function from invalid context
        Added Targa Visionary 1000 IDE adapter to pata_sis.c
        libata-acpi: filter out DIPM enable
      4d727a78
    • Dave Chinner's avatar
      Fix reference counting race on log buffers · 49641f1a
      Dave Chinner authored
      When we release the iclog, we do an atomic_dec_and_lock to determine if
      we are the last reference and need to trigger update of log headers and
      writeout.  However, in xlog_state_get_iclog_space() we also need to
      check if we have the last reference count there.  If we do, we release
      the log buffer, otherwise we decrement the reference count.
      
      But the compare and decrement in xlog_state_get_iclog_space() is not
      atomic, so both places can see a reference count of 2 and neither will
      release the iclog.  That leads to a filesystem hang.
      
      Close the race by replacing the atomic_read() and atomic_dec() pair with
      atomic_add_unless() to ensure that they are executed atomically.
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Reviewed-by: default avatarTim Shimmin <tes@sgi.com>
      Tested-by: default avatarEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      49641f1a
    • Steven Rostedt's avatar
      sched_clock: and multiplier for TSC to gtod drift · c300ba25
      Steven Rostedt authored
      The sched_clock code currently tries to keep all CPU clocks of all CPUS
      somewhat in sync. At every clock tick it records the gtod clock and
      uses that and jiffies and the TSC to calculate a CPU clock that tries to
      stay in sync with all the other CPUs.
      
      ftrace depends heavily on this timer and it detects when this timer
      "jumps".  One problem is that the TSC and the gtod also drift.
      When the TSC is 0.1% faster or slower than the gtod it is very noticeable
      in ftrace. To help compensate for this, I've added a multiplier that
      tries to keep the CPU clock updating at the same rate as the gtod.
      
      I've tried various ways to get it to be in sync and this ended up being
      the most reliable. At every scheduler tick we calculate the new multiplier:
      
        multi = delta_gtod / delta_TSC
      
      This means we perform a 64 bit divide at the tick (once a HZ). A shift
      is used to handle the accuracy.
      
      Other methods that failed due to dynamic HZ are:
      
      (not used)  multi += (gtod - tsc) / delta_gtod
      (not used)  multi += (gtod - (last_tsc + delta_tsc)) / delta_gtod
      
      as well as other variants.
      
      This code still allows for a slight drift between TSC and gtod, but
      it keeps the damage down to a minimum.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c300ba25
    • Steven Rostedt's avatar
      sched_clock: record TSC after gtod · a83bc47c
      Steven Rostedt authored
      To read the gtod we need to grab the xtime lock for read. Reading the gtod
      before the TSC can cause a bigger gab if the xtime lock is contended.
      
      This patch simply reverses the order to read the TSC after the gtod.
      The locking in the reading of the gtod handles any barriers one might
      think is needed.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a83bc47c
    • Steven Rostedt's avatar
      sched_clock: only update deltas with local reads. · c0c87734
      Steven Rostedt authored
      Reading the CPU clock should try to stay accurate within the CPU.
      By reading the CPU clock from another CPU and updating the deltas can
      cause unneeded jumps when reading from the local CPU.
      
      This patch changes the code to update the last read TSC only when read
      from the local CPU.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c0c87734
    • Steven Rostedt's avatar
      sched_clock: fix calculation of other CPU · 2b8a0cf4
      Steven Rostedt authored
      The algorithm to calculate the 'now' of another CPU is not correct.
      At each scheduler tick, each CPU records the last sched_clock and
      gtod (tick_raw and tick_gtod respectively). If the TSC is somewhat the
      same in speed between two clocks the algorithm would be:
      
        tick_gtod1 + (now1 - tick_raw1) = tick_gtod2 + (now2 - tick_raw2)
      
      To calculate now2 we would have:
      
        now2 = (tick_gtod1 - tick_gtod2) + (tick_raw2 - tick_raw1) + now1
      
      Currently the algorithm is:
      
        now2 = (tick_gtod1 - tick_gtod2) + (tick_raw1 - tick_raw2) + now1
      
      This solves most of the rest of the issues I've had with timestamps in
      ftace.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2b8a0cf4
    • Steven Rostedt's avatar
      sched_clock: stop maximum check on NO HZ · af52a90a
      Steven Rostedt authored
      Working with ftrace I would get large jumps of 11 millisecs or more with
      the clock tracer. This killed the latencing timings of ftrace and also
      caused the irqoff self tests to fail.
      
      What was happening is with NO_HZ the idle would stop the jiffy counter and
      before the jiffy counter was updated the sched_clock would have a bad
      delta jiffies to compare with the gtod with the maximum.
      
      The jiffies would stop and the last sched_tick would record the last gtod.
      On wakeup, the sched clock update would compare the gtod + delta jiffies
      (which would be zero) and compare it to the TSC. The TSC would have
      correctly (with a stable TSC) moved forward several jiffies. But because the
      jiffies has not been updated yet the clock would be prevented from moving
      forward because it would appear that the TSC jumped too far ahead.
      
      The clock would then virtually stop, until the jiffies are updated. Then
      the next sched clock update would see that the clock was very much behind
      since the delta jiffies is now correct. This would then jump the clock
      forward by several jiffies.
      
      This caused ftrace to report several milliseconds of interrupts off
      latency at every resume from NO_HZ idle.
      
      This patch adds hooks into the nohz code to disable the checking of the
      maximum clock update when nohz is in effect. It resumes the max check
      when nohz has updated the jiffies again.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      af52a90a
    • Steven Rostedt's avatar
      sched_clock: widen the max and min time · f7cce27f
      Steven Rostedt authored
      With keeping the max and min sched time within one jiffy of the gtod clock
      was too tight. Just before a schedule tick the max could easily be hit, as
      well as just after a schedule_tick the min could be hit. This caused the
      clock to jump around by a jiffy.
      
      This patch widens the minimum to
         last gtod + (delta_jiffies ? delta_jiffies - 1 : 0) * TICK_NSECS
      
      and the maximum to
          last gtod + (2 + delta_jiffies) * TICK_NSECS
      
      This keeps the minum to gtod or if one jiffy less than delta jiffies
      and the maxim 2 jiffies ahead of gtod. This may cause unstable TSCs to be
      a bit more sporadic, but it helps keep a clock with a stable TSC working well.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f7cce27f
    • Steven Rostedt's avatar
      sched_clock: record from last tick · 62c43dd9
      Steven Rostedt authored
      The sched_clock code tries to keep within the gtod time by one tick (jiffy).
      The current code mistakenly keeps track of the delta jiffies between
      updates of the clock, where the the delta is used to compare with the
      number of jiffies that have past since an update of the gtod. The gtod is
      updated at each schedule tick not each sched_clock update. After one
      jiffy passes the clock is updated fine. But the delta is taken from the
      last update so if the next update happens before the next tick the delta
      jiffies used will be incorrect.
      
      This patch changes the code to check the delta of jiffies between ticks
      and not updates to match the comparison of the updates with the gtod.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      62c43dd9
    • Zhang Rui's avatar
      libata-acpi: don't call sleeping function from invalid context · 3c1e3896
      Zhang Rui authored
      The problem is introduced by commit
      664d080c.
      
      acpi_evaluate_integer is a sleeping function,
      and it should not be called with spin_lock_irqsave.
      https://bugzilla.redhat.com/show_bug.cgi?id=451399Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      3c1e3896
    • Kai Krakow's avatar
      Added Targa Visionary 1000 IDE adapter to pata_sis.c · edb80471
      Kai Krakow authored
      This enables short 40-wire detection for my laptop thus
      enabling UDMA/100.
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      edb80471
    • Tejun Heo's avatar
      libata-acpi: filter out DIPM enable · b344991a
      Tejun Heo authored
      Some BIOSen enable DIPM via _GTF which causes command timeouts under
      certain configuration.  This didn't occur on 2.6.25 because 2.6.25
      defaulted to SRST, so _GTF wasn't executed during boot probe, so ahci
      host reset disabled DIPM and as _GTF wasn't executed after SRST, DIPM
      wasn't enabled.  On 2.6.26, hardreset is used during probe and after
      probe _GTF is executed enabling DIPM and thus the failures.
      
      This patch could theoretically disable DIPM on machines which used to
      have it enabled on 2.6.25 but AFAIK ahci is currently the only driver
      which uses SATA ACPI hierarchy (_SDD) and as the host reset would have
      always disabled DIPM, this shouldn't happen.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      b344991a