1. 22 Oct, 2010 4 commits
    • Rakib Mullick's avatar
      [CPUFREQ]: x86, cpufreq: Mark longrun_get_policy with __cpuinit. · a69a0612
      Rakib Mullick authored
      This patch fixes the following warning. The function
      longrun_cpu_init() is marked with __cpuinit which calls
      longrun_get_policy() which is a __init function. So make
      longrun_get_policy with __cpuinit.
      
      WARNING: arch/x86/kernel/cpu/cpufreq/longrun.o(.cpuinit.text+0x4c5):
      Section mismatch in reference from the function longrun_cpu_init() to
      the function .init.text:longrun_get_policy()
      The function __cpuinit longrun_cpu_init() references
      a function __init longrun_get_policy().
      If longrun_get_policy is only used by longrun_cpu_init then
      annotate longrun_get_policy with a matching annotation.
      Signed-off-by: default avatarRakib Mullick <rakib.mullick@gmail.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      a69a0612
    • David C Niemi's avatar
      [CPUFREQ] add sampling_down_factor tunable to improve ondemand performance · 3f78a9f7
      David C Niemi authored
      Adds a new global tunable, sampling_down_factor.  Set to 1 it makes no
      changes from existing behavior, but set to greater than 1 (e.g. 100)
      it acts as a multiplier for the scheduling interval for reevaluating
      load when the CPU is at its top speed due to high load.  This improves
      performance by reducing the overhead of load evaluation and helping
      the CPU stay at its top speed when truly busy, rather than shifting
      back and forth in speed.  This tunable has no effect on behavior at
      lower speeds/lower CPU loads.
      
      This patch is against 2.6.36-rc6.
      
      This patch should help solve kernel bug 19672 "ondemand is slow".
      Signed-off-by: default avatarDavid Niemi <dniemi@verisign.com>
      Acked-by: default avatarVenkatesh Pallipadi <venki@google.com>
      CC: Daniel Hollocher <danielhollocher@gmail.com>
      CC: <cpufreq-list@vger.kernel.org>
      CC: <linux-kernel@vger.kernel.org>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      3f78a9f7
    • Julia Lawall's avatar
      [CPUFREQ] arch/x86/kernel/cpu/cpufreq: Fix unsigned return type · b2a33c17
      Julia Lawall authored
      In each case, the function has an unsigned return type, but returns a
      negative constant to indicate an error condition.  Each function is only
      called once.  For nforce2_detect_chipset, the result is only compared to 0,
      and for longrun_determine_freqs, the result is stored in a variable of type
      (signed) int.  Thus, for both functions, unsigned can be dropped from the
      return type.
      
      A sematic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @exists@
      identifier f;
      constant C;
      @@
      
       unsigned f(...)
       { <+...
      *  return -C;
       ...+> }
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      b2a33c17
    • Julia Lawall's avatar
      [CPUFREQ] drivers/cpufreq: Adjust confusing if indentation · bec037aa
      Julia Lawall authored
      Indent the body of for_each_cpu.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable braces4@
      position p1,p2;
      statement S1,S2;
      @@
      
      (
      if (...) { ... }
      |
      if (...) S1@p1 S2@p2
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      if (p1[0].column == p2[0].column):
        cocci.print_main("branch",p1)
        cocci.print_secs("after",p2)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      bec037aa
  2. 13 Aug, 2010 1 commit
    • Linus Torvalds's avatar
      mm: keep a guard page below a grow-down stack segment · 320b2b8d
      Linus Torvalds authored
      This is a rather minimally invasive patch to solve the problem of the
      user stack growing into a memory mapped area below it.  Whenever we fill
      the first page of the stack segment, expand the segment down by one
      page.
      
      Now, admittedly some odd application might _want_ the stack to grow down
      into the preceding memory mapping, and so we may at some point need to
      make this a process tunable (some people might also want to have more
      than a single page of guarding), but let's try the minimal approach
      first.
      
      Tested with trivial application that maps a single page just below the
      stack, and then starts recursing.  Without this, we will get a SIGSEGV
      _after_ the stack has smashed the mapping.  With this patch, we'll get a
      nice SIGBUS just as the stack touches the page just above the mapping.
      Requested-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      320b2b8d
  3. 12 Aug, 2010 35 commits