1. 21 9月, 2005 1 次提交
    • D
      [CPUFREQ] Avoid the ondemand cpufreq governor to use a too high frequency for stats. · df8b59be
      Dave Jones 提交于
      The problem is in the ondemand governor, there is a periodic measurement
      of the CPU usage. This CPU usage is updated by the scheduler after every
      tick (basically, by adding 1 either to "idle" or to "user" or to
      "system"). So if the frequency of the governor is too high, the stat
      will be meaningless (as mostly no number have changed).
      
      So this patch checks that the measurements are separated by at least 10
      ticks. It means that by default, stats will have about 5% error (20
      ticks). Of course those numbers can be argued but, IMHO, they look sane.
      The patch also includes a small clean-up to check more explictly the
      result of the conversion from ns to µs being null.
      
      Let's note that (on x86) this has never been really needed before 2.6.13
      because HZ was always 1000. Now that HZ can be 100, some CPU might be
      affected by this problem. For instance when HZ=100, the centrino ,which
      has a 10µs transition latency, would lead to the governor allowing to
      read stats every tick (10ms)!
      Signed-off-by: NEric Piel <eric.piel@tremplin-utc.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      df8b59be
  2. 20 9月, 2005 12 次提交
  3. 19 9月, 2005 3 次提交
    • J
      [SCSI] Fix thread termination for the SCSI error handle · 3ed7a470
      James Bottomley 提交于
      From: 	Alan Stern <stern@rowland.harvard.edu>
      
      This patch (as561) fixes the error handler's thread-exit code.  The
      kthread_stop call won't wake the thread from a down_interruptible, so
      the patch gets rid of the semaphore and simply does
      
              set_current_state(TASK_INTERRUPTIBLE);
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      
      Modified to simplify the termination loop and correct the sleep condition.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3ed7a470
    • J
      [SCSI] fix oops on usb storage device disconnect · 939647ee
      James Bottomley 提交于
      We fix the oops by enforcing the host state model.  There have also
      been two extra states added: SHOST_CANCEL_RECOVERY and
      SHOST_DEL_RECOVERY so we can take the model through host removal while
      the recovery thread is active.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      939647ee
    • A
      [SCSI] SCSI scanning and removal fixes · a64358db
      Alan Stern 提交于
      This patch (as545) fixes the list traversals in __scsi_remove_target and
      scsi_forget_host.  In each case the existing code list_for_each_entry_safe
      in an _unsafe_ manner, because the list was not protected from outside
      modification while the iteration was running.
      
      The new scsi_forget_host routine takes the moderately controversial step
      of iterating over devices for removal rather than iterating over targets.
      This makes more sense to me because the current scheme treats targets as
      second-class citizens, created and removed on demand, rather than as
      objects corresponding to actual hardware.  (Also I couldn't figure out any
      safe way to iterate over the target list, since it's not so easy to tell
      when a target has already been removed.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a64358db
  4. 18 9月, 2005 19 次提交
  5. 17 9月, 2005 5 次提交