1. 29 4月, 2008 1 次提交
  2. 07 2月, 2008 1 次提交
    • V
      [CPUFREQ] Eliminate cpufreq_userspace scaling_setspeed deadlock · 9e76988e
      Venki Pallipadi 提交于
      Eliminate cpufreq_userspace scaling_setspeed deadlock.
      
      Luming Yu recently uncovered yet another cpufreq related deadlock.
      One thread that continuously switches the governors and the other thread that
      repeatedly cats the contents of cpufreq directory causes both these threads to
      go into a deadlock.
      
      Detailed examination of the deadlock showed the exact flow before the deadlock
      as:
      
      Thread 1			Thread 2
      ________			________
      				cats files under /sys/devices/.../cpufreq/
      Set governor to userspace
        Adds a new sysfs entry for
        scaling_setspeed
      				cats files under /sys/devices/.../cpufreq/
      
      Set governor to performance
        Holds cpufreq_rw_sem in write
        mode
        Sends a STOP notify to
        userspace governor
      				cat /sys/devices/.../cpufreq/scaling_setspeed
      				  Gets a handle on the above sysfs entry with
      				  sysfs_get_active
      				  Blocks while trying to get cpufreq_rw_sem
      				  in read mode
        Remove a sysfs entry for
        scaling_setspeed
          Blocks on sysfs_deactivate
          while waiting for earlier
          get_active (on other thread)
          to drain
      
      At this point both threads go into deadlock and any other thread that tries to
      do anything with sysfs cpufreq will also block.
      
      There seems to be no easy way to avoid this deadlock as long as
      cpufreq_userspace adds/removes the sysfs entry under same kobject as cpufreq.
      Below patch moves scaling_setspeed to cpufreq.c, keeping it always and calling
      back the governor on read/write. This is the cleanest fix I could think of,
      even though adding two callbacks in governor structure just for this seems
      unnecessary.
      
      Note that the change makes scaling_setspeed under /sys/.../cpufreq permanent
      and returns <unsupported> when governor is not userspace.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      9e76988e
  3. 05 10月, 2007 3 次提交
  4. 27 9月, 2007 1 次提交
  5. 03 5月, 2007 1 次提交
  6. 27 4月, 2007 1 次提交
  7. 27 2月, 2007 1 次提交
  8. 23 2月, 2007 1 次提交
  9. 11 2月, 2007 1 次提交
  10. 16 10月, 2006 1 次提交
    • V
      [CPUFREQ][8/8] acpi-cpufreq: Add support for freq feedback from hardware · dfde5d62
      Venkatesh Pallipadi 提交于
      Enable ondemand governor and acpi-cpufreq to use IA32_APERF and IA32_MPERF MSR
      to get active frequency feedback for the last sampling interval. This will
      make ondemand take right frequency decisions when hardware coordination of
      frequency is going on.
      
      Without APERF/MPERF, ondemand can take wrong decision at times due
      to underlying hardware coordination or TM2.
      Example:
      * CPU 0 and CPU 1 are hardware cooridnated.
      * CPU 1 running at highest frequency.
      * CPU 0 was running at highest freq. Now ondemand reduces it to
        some intermediate frequency based on utilization.
      * Due to underlying hardware coordination with other CPU 1, CPU 0 continues to
        run at highest frequency (as long as other CPU is at highest).
      * When ondemand samples CPU 0 again next time, without actual frequency
        feedback from APERF/MPERF, it will think that previous frequency change
        was successful and can go to wrong target frequency. This is because it
        thinks that utilization it has got this sampling interval is when running at
        intermediate frequency, rather than actual highest frequency.
      
      More information about IA32_APERF IA32_MPERF MSR:
      Refer to IA-32 Intel® Architecture Software Developer's Manual at
      http://developer.intel.comSigned-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      dfde5d62
  11. 26 7月, 2006 1 次提交
    • A
      [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare · 153d7f3f
      Arjan van de Ven 提交于
      The patch below moves the cpu hotplugging higher up in the cpufreq
      layering; this is needed to avoid recursive taking of the cpu hotplug
      lock and to otherwise detangle the mess.
      
      The new rules are:
      1. you must do lock_cpu_hotplug() around the following functions:
         __cpufreq_driver_target
         __cpufreq_governor (for CPUFREQ_GOV_LIMITS operation only)
         __cpufreq_set_policy
      2. governer methods (.governer) must NOT take the lock_cpu_hotplug()
         lock in any way; they are called with the lock taken already
      3. if your governer spawns a thread that does things, like calling
         __cpufreq_driver_target, your thread must honor rule #1.
      4. the policy lock and other cpufreq internal locks nest within
         the lock_cpu_hotplug() lock.
      
      I'm not entirely happy about how the __cpufreq_governor rule ended up
      (conditional locking rule depending on the argument) but basically all
      callers pass this as a constant so it's not too horrible.
      
      The patch also removes the cpufreq_governor() function since during the
      locking audit it turned out to be entirely unused (so no need to fix it)
      
      The patch works on my testbox, but it could use more testing
      (otoh... it can't be much worse than the current code)
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      153d7f3f
  12. 26 6月, 2006 1 次提交
  13. 26 4月, 2006 1 次提交
  14. 09 2月, 2006 1 次提交
  15. 19 1月, 2006 1 次提交
  16. 07 12月, 2005 1 次提交
    • V
      [CPUFREQ] CPU frequency display in /proc/cpuinfo · 95235ca2
      Venkatesh Pallipadi 提交于
      What is the value shown in "cpu MHz" of /proc/cpuinfo when CPUs are capable of
      changing frequency?
      
      Today the answer is: It depends.
      On i386:
      SMP kernel - It is always the boot frequency
      UP kernel - Scales with the frequency change and shows that was last set.
      
      On x86_64:
      There is one single variable cpu_khz that gets written by all the CPUs. So,
      the frequency set by last CPU will be seen on /proc/cpuinfo of all the
      CPUs in the system. What you see also depends on whether you have constant_tsc
      capable CPU or not.
      
      On ia64:
      It is always boot time frequency of a particular CPU that gets displayed.
      
      The patch below changes this to:
      Show the last known frequency of the particular CPU, when cpufreq is present. If
      cpu doesnot support changing of frequency through cpufreq, then boot frequency
      will be shown. The patch affects i386, x86_64 and ia64 architectures.
      
      Signed-off-by: Venkatesh Pallipadi<venkatesh.pallipadi@intel.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      95235ca2
  17. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  18. 08 7月, 2005 1 次提交
  19. 01 6月, 2005 1 次提交
  20. 29 4月, 2005 1 次提交
  21. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4