1. 27 10月, 2008 1 次提交
  2. 26 10月, 2008 1 次提交
    • L
      Revert "Call init_workqueues before pre smp initcalls." · 4403b406
      Linus Torvalds 提交于
      This reverts commit a802dd0e by moving
      the call to init_workqueues() back where it belongs - after SMP has been
      initialized.
      
      It also moves stop_machine_init() - which needs workqueues - to a later
      phase using a core_initcall() instead of early_initcall().  That should
      satisfy all ordering requirements, and was apparently the reason why
      init_workqueues() was moved to be too early.
      
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4403b406
  3. 24 10月, 2008 6 次提交
  4. 23 10月, 2008 4 次提交
  5. 22 10月, 2008 12 次提交
    • L
      sched: add CONFIG_SMP consistency · 4ce72a2c
      Li Zefan 提交于
      a patch from Henrik Austad did this:
      
      >> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
      >> not set.
      
      Peter observed:
      
      > While a proper cleanup, could you do it by re-arranging the methods so
      > as to not create an additional ifdef?
      
      Do not declare select_task_rq and some other methods as part of sched_class
      when CONFIG_SMP is not set.
      
      Also gather those methods to avoid CONFIG_SMP mess.
      Idea-by: NHenrik Austad <henrik.austad@gmail.com>
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Acked-by: NHenrik Austad <henrik@austad.us>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ce72a2c
    • R
      irq: make variable static · 3786fc71
      roel kluin 提交于
      This variable is only used in the source file, so make it static.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3786fc71
    • H
      stop_machine: fix error code handling on multiple cpus · 8163bcac
      Heiko Carstens 提交于
      Using |= for updating a value which might be updated on several cpus
      concurrently will not always work since we need to make sure that the
      update happens atomically.
      To fix this just use a write if the called function returns an error
      code on a cpu. We end up writing the error code of an arbitrary cpu
      if multiple ones fail but that should be sufficient.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      8163bcac
    • H
      stop_machine: use workqueues instead of kernel threads · c9583e55
      Heiko Carstens 提交于
      Convert stop_machine to a workqueue based approach. Instead of using kernel
      threads for stop_machine we now use a an rt workqueue to synchronize all
      cpus.
      This has the advantage that all needed per cpu threads are already created
      when stop_machine gets called. And therefore a call to stop_machine won't
      fail anymore. This is needed for s390 which needs a mechanism to synchronize
      all cpus without allocating any memory.
      As Rusty pointed out free_module() needs a non-failing stop_machine interface
      as well.
      
      As a side effect the stop_machine code gets simplified.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c9583e55
    • H
      workqueue: introduce create_rt_workqueue · 0d557dc9
      Heiko Carstens 提交于
      create_rt_workqueue will create a real time prioritized workqueue.
      This is needed for the conversion of stop_machine to a workqueue based
      implementation.
      This patch adds yet another parameter to __create_workqueue_key to tell
      it that we want an rt workqueue.
      However it looks like we rather should have something like "int type"
      instead of singlethread, freezable and rt.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      0d557dc9
    • R
      Make panic= and panic_on_oops into core_params · f44dd164
      Rusty Russell 提交于
      This allows them to be examined and set after boot, plus means they
      actually give errors if they are misused (eg. panic=yes).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      f44dd164
    • R
      core_param() for genuinely core kernel parameters · 67e67cea
      Rusty Russell 提交于
      There are a lot of one-liner uses of __setup() in the kernel: they're
      cumbersome and not queryable (definitely not settable) via /sys.  Yet
      it's ugly to simplify them to module_param(), because by default that
      inserts a prefix of the module name (usually filename).
      
      So, introduce a "core_param".  The parameter gets no prefix, but
      appears in /sys/module/kernel/parameters/ (if non-zero perms arg).  I
      thought about using the name "core", but that's more common than
      "kernel".  And if you create a module called "kernel", you will die
      a horrible death.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      67e67cea
    • R
      param: Fix duplicate module prefixes · 9b473de8
      Rusty Russell 提交于
      Instead of insisting each new module_param sysfs entry is unique,
      handle the case where it already exists (for builtin modules).
      
      The current code assumes that all identical prefixes are together in
      the section: true for normal uses, but not necessarily so if someone
      overrides MODULE_PARAM_PREFIX.  More importantly, it's not true with
      the new "core_param()" code which uses "kernel" as a prefix.
      
      This simplifies the caller for the builtin case, at a slight loss of
      efficiency (we do the lookup every time to see if the directory
      exists).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      9b473de8
    • R
      module: check kernel param length at compile time, not runtime · 730b69d2
      Rusty Russell 提交于
      The kparam code tries to handle over-length parameter prefixes at
      runtime.  Not only would I bet this has never been tested, it's not
      clear that truncating names is a good idea either.
      
      So let's check at compile time.  We need to move the #define to
      moduleparam.h to do this, though.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      730b69d2
    • A
      Remove stop_machine during module load v2 · d72b3751
      Andi Kleen 提交于
      Remove stop_machine during module load v2
      
      module loading currently does a stop_machine on each module load to insert
      the module into the global module lists.  Especially on larger systems this
      can be quite expensive.
      
      It does that to handle concurrent lock lessmodule list readers
      like kallsyms.
      
      I don't think stop_machine() is actually needed to insert something
      into a list though. There are no concurrent writers because the
      module mutex is taken. And the RCU list functions know how to insert
      a node into a list with the right memory ordering so that concurrent
      readers don't go off into the wood.
      
      So remove the stop_machine for the module list insert and just
      do a list_add_rcu() instead.
      
      Module removal will still do a stop_machine of course, it needs
      that for other reasons.
      
      v2: Revised readers based on Paul's comments. All readers that only
          rely on disabled preemption need to be changed to list_for_each_rcu().
          Done that. The others are ok because they have the modules mutex.
          Also added a possible missing preempt disable for print_modules().
      
      [cc Paul McKenney for review. It's not RCU, but quite similar.]
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      d72b3751
    • R
      module: simplify load_module. · 5e458cc0
      Rusty Russell 提交于
      Linus' recent catch of stack overflow in load_module lead me to look
      at the code.  A couple of helpers to get a section address and get
      objects from a section can help clean things up a little.
      
      (And in case you're wondering, the stack size also dropped from 328 to
      284 bytes).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      5e458cc0
    • T
      NOHZ: fix thinko in the timer restart code path · c4bd822e
      Thomas Gleixner 提交于
      commit fb02fbc1 (NOHZ: restart tick
      device from irq_enter())
      
      solves the problem of stale jiffies when long running softirqs happen
      in a long idle sleep period, but it has a major thinko in it:
      
      When the interrupt which came in _is_ the timer interrupt which should
      expire ts->sched_timer then we cancel and rearm the timer _before_ it
      gets expired in hrtimer_interrupt() to the next period. That means the
      call back function is not called. This game can go on for ever :(
      
      Prevent this by making sure to only rearm the timer when the expiry
      time is more than one tick_period away. Otherwise keep it running as
      it is either already expired or will expiry at the right point to
      update jiffies.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NVenkatesch Pallipadi <venkatesh.pallipadi@intel.com>
      c4bd822e
  6. 21 10月, 2008 8 次提交
  7. 20 10月, 2008 8 次提交