1. 26 7月, 2008 1 次提交
  2. 19 7月, 2008 1 次提交
    • M
      cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr · 65c01184
      Mike Travis 提交于
        * This patch replaces the dangerous lvalue version of cpumask_of_cpu
          with new cpumask_of_cpu_ptr macros.  These are patterned after the
          node_to_cpumask_ptr macros.
      
          In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
          the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
          is provided when there is a large NR_CPUS count, reducing
          greatly the amount of code generated and stack space used for
          cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
          calling set_cpus_allowed_ptr() to reduce the amount of stack space
          needed to pass the cpumask_t value.
      
          If there isn't a cpumask_of_cpu_map[], then a temporary variable is
          declared and filled in with value from cpumask_of_cpu(cpu) as well as
          a pointer variable pointing to this temporary variable.  Afterwards,
          the pointer is used to reference the cpumask value.  The compiler
          will optimize out the extra dereference through the pointer as well
          as the stack space used for the pointer, resulting in identical code.
      
          A good example of the orthogonal usages is in net/sunrpc/svc.c:
      
      	case SVC_POOL_PERCPU:
      	{
      		unsigned int cpu = m->pool_to[pidx];
      		cpumask_of_cpu_ptr(cpumask, cpu);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, cpumask);
      		return 1;
      	}
      	case SVC_POOL_PERNODE:
      	{
      		unsigned int node = m->pool_to[pidx];
      		node_to_cpumask_ptr(nodecpumask, node);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, nodecpumask);
      		return 1;
      	}
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      65c01184
  3. 17 7月, 2008 3 次提交
    • R
      acpi: fix printk format warning · 12b2b34e
      Randy Dunlap 提交于
      Fix printk format warning:
      
      linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      12b2b34e
    • Y
      ACPI: fix processor throttling set error · 3d532d5e
      Yi Yang 提交于
      http://bugzilla.kernel.org/show_bug.cgi?id=9704
      
      When echo some invalid values to /proc/acpi/processor/*/throttling,
      there isn't any error info returned, on the contray, it sets
      throttling value to some T* successfully, obviously, this is incorrect,
      a correct way should be to let it fail and return error info.
      
      This patch fixed the aforementioned issue, it also enables
      /proc/acpi/processor/*/throttling to accept such values as 't0' and 'T0',
      it also strictly limits /proc/acpi/processor/*/throttling only to accept
       "*", "t*" and "T*", "*" is the throttling state value the processor can
      support, current, it is 0 - 7.
      
      Before applying this patch, the test result is below:
      
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "1xxxxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# cd /
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T100" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "2xxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T2
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
         *T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "7777" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost /]# echo "7xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost /]#
      
      After applying this patch, the test result is below:
      
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# vi drivers/acpi/processor_throttling.c
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "t7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "7000" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo -n > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo $?
      0
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo t0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo T0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo Tt0 > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo T > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]#
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      3d532d5e
    • M
      ACPI: change processors from array to per_cpu variable · 706546d0
      Mike Travis 提交于
      Change processors from an array sized by NR_CPUS to a per_cpu variable.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      706546d0
  4. 24 5月, 2008 1 次提交
  5. 29 4月, 2008 1 次提交
  6. 20 4月, 2008 1 次提交
    • M
      generic: use new set_cpus_allowed_ptr function · f70316da
      Mike Travis 提交于
        * Use new set_cpus_allowed_ptr() function added by previous patch,
          which instead of passing the "newly allowed cpus" cpumask_t arg
          by value,  pass it by pointer:
      
          -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
          +int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)
      
        * Modify CPU_MASK_ALL
      
      Depends on:
      	[sched-devel]: sched: add new set_cpus_allowed_ptr function
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f70316da
  7. 02 2月, 2008 5 次提交
  8. 15 1月, 2008 1 次提交
  9. 02 12月, 2007 1 次提交
  10. 17 11月, 2007 5 次提交
  11. 25 7月, 2007 1 次提交
  12. 24 7月, 2007 1 次提交
  13. 03 7月, 2007 1 次提交
  14. 02 6月, 2007 2 次提交
  15. 13 2月, 2007 2 次提交
  16. 03 2月, 2007 1 次提交
  17. 14 10月, 2006 1 次提交
  18. 27 6月, 2006 3 次提交
  19. 08 1月, 2006 1 次提交
  20. 07 1月, 2006 1 次提交
  21. 05 8月, 2005 1 次提交
  22. 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