1. 17 6月, 2011 1 次提交
  2. 26 5月, 2011 1 次提交
  3. 23 3月, 2011 2 次提交
  4. 28 10月, 2010 1 次提交
  5. 07 3月, 2010 1 次提交
  6. 18 11月, 2009 1 次提交
    • R
      generic-ipi: Add smp_call_function_any() · 2ea6dec4
      Rusty Russell 提交于
      Andrew points out that acpi-cpufreq uses cpumask_any, when it really
      would prefer to use the same CPU if possible (to avoid an IPI).  In
      general, this seems a good idea to offer.
      
      [ tglx: Documented selection preference and Inlined the UP case to
        	avoid the copy of smp_call_function_single() and the extra
        	EXPORT ]
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Zhao Yakui <yakui.zhao@intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      2ea6dec4
  7. 24 9月, 2009 1 次提交
  8. 17 6月, 2009 1 次提交
    • T
      remove put_cpu_no_resched() · 8b0b1db0
      Thomas Gleixner 提交于
      put_cpu_no_resched() is an optimization of put_cpu() which unfortunately
      can cause high latencies.
      
      The nfs iostats code uses put_cpu_no_resched() in a code sequence where a
      reschedule request caused by an interrupt between the get_cpu() and the
      put_cpu_no_resched() can delay the reschedule for at least HZ.
      
      The other users of put_cpu_no_resched() optimize correctly in interrupt
      code, but there is no real harm in using the put_cpu() function which is
      an alias for preempt_enable().  The extra check of the preemmpt count is
      not as critical as the potential source of missing a reschedule.
      
      Debugged in the preempt-rt tree and verified in mainline.
      
      Impact: remove a high latency source
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b0b1db0
  9. 13 3月, 2009 1 次提交
  10. 25 2月, 2009 1 次提交
    • P
      generic-ipi: remove CSD_FLAG_WAIT · 6e275637
      Peter Zijlstra 提交于
      Oleg noticed that we don't strictly need CSD_FLAG_WAIT, rework
      the code so that we can use CSD_FLAG_LOCK for both purposes.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6e275637
  11. 06 2月, 2009 2 次提交
  12. 11 1月, 2009 1 次提交
  13. 30 12月, 2008 1 次提交
    • R
      cpumask: smp_call_function_many() · 54b11e6d
      Rusty Russell 提交于
      Impact: Implementation change to remove cpumask_t from stack.
      
      Actually change smp_call_function_mask() to smp_call_function_many().
      We avoid cpumasks on the stack in this version.
      
      (S390 has its own version, but that's going away apparently).
      
      We have to do some dancing to figure out if 0 or 1 other cpus are in
      the mask supplied and the online mask without allocating a tmp
      cpumask.  It's still fairly cheap.
      
      We allocate the cpumask at the end of the call_function_data
      structure: if allocation fails we fallback to smp_call_function_single
      rather than using the baroque quiescing code (which needs a cpumask on
      stack).
      
      (Thanks to Hiroshi Shimamoto for spotting several bugs in previous versions!)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: npiggin@suse.de
      Cc: axboe@kernel.dk
      54b11e6d
  14. 19 12月, 2008 1 次提交
    • M
      cpumask: add sysfs displays for configured and disabled cpu maps · e057d7ae
      Mike Travis 提交于
      Impact: add new sysfs files.
      
      Add sysfs files "kernel_max" and "offline" to display the max CPU index
      allowed (NR_CPUS-1), and the map of cpus that are offline.
      
      Cpus can be offlined via HOTPLUG, disabled by the BIOS ACPI tables, or
      if they exceed the number of cpus allowed by the NR_CPUS config option,
      or the "maxcpus=NUM" kernel start parameter.
      
      The "possible_cpus=NUM" parameter can also extend the number of possible
      cpus allowed, in which case the cpus not present at startup will be
      in the offline state.  (These cpus can be HOTPLUGGED ON after system
      startup [pending a follow-on patch to provide the capability via the
      /sys/devices/sys/cpu/cpuN/online mechanism to bring them online.])
      
      By design, the "offlined cpus > possible cpus" display will always
      use the following formats:
      
        * all possible cpus online:   "x$"    or "x-y$"
        * some possible cpus offline: ".*,x$" or ".*,x-y$"
      
      where:
        x == number of possible cpus (nr_cpu_ids); and
        y == number of cpus >= NR_CPUS or maxcpus (if y > x).
      
      One use of this feature is for distros to select (or configure) the
      appropriate kernel to install for the resident system.
      
      Notes:
        * cpus offlined <= possible cpus will be printed for all architectures.
        * cpus offlined >  possible cpus will only be printed for arches that
        	set 'total_cpus' [X86 only in this patch].
      
      Based on tip/cpus4096 + .../rusty/linux-2.6-for-ingo.git/master +
      	 x86-only-patches sent 12/15.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e057d7ae
  15. 16 12月, 2008 1 次提交
  16. 06 11月, 2008 1 次提交
    • R
      cpumask: introduce new API, without changing anything · 2d3854a3
      Rusty Russell 提交于
      Impact: introduce new APIs
      
      We want to deprecate cpumasks on the stack, as we are headed for
      gynormous numbers of CPUs.  Eventually, we want to head towards an
      undefined 'struct cpumask' so they can never be declared on stack.
      
      1) New cpumask functions which take pointers instead of copies.
         (cpus_* -> cpumask_*)
      
      2) Several new helpers to reduce requirements for temporary cpumasks
         (cpumask_first_and, cpumask_next_and, cpumask_any_and)
      
      3) Helpers for declaring cpumasks on or offstack for large NR_CPUS
         (cpumask_var_t, alloc_cpumask_var and free_cpumask_var)
      
      4) 'struct cpumask' for explicitness and to mark new-style code.
      
      5) Make iterator functions stop at nr_cpu_ids (a runtime constant),
         not NR_CPUS for time efficiency and for smaller dynamic allocations
         in future.
      
      6) cpumask_copy() so we can allocate less than a full cpumask eventually
         (for alloc_cpumask_var), and so we can eliminate the 'struct cpumask'
         definition eventually.
      
      7) work_on_cpu() helper for doing task on a CPU, rather than saving old
         cpumask for current thread and manipulating it.
      
      8) smp_call_function_many() which is smp_call_function_mask() except
         taking a cpumask pointer.
      
      Note that this patch simply introduces the new functions and leaves
      the obsolescent ones in place.  This is to simplify the transition
      patches.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2d3854a3
  17. 17 10月, 2008 1 次提交
  18. 27 7月, 2008 1 次提交
  19. 04 7月, 2008 1 次提交
    • H
      generic-ipi: fix s390 build bug · ba8dd03a
      Heiko Carstens 提交于
      forgot to remove #include <linux/spinlock.h> from linux/smp.h while
      fixing the original s390 build bug.
      
      Patch below fixes this build bug caused by header inclusion dependencies:
      
        CC      kernel/timer.o
      In file included from include/linux/spinlock.h:87,
                       from include/linux/smp.h:11,
                       from include/linux/kernel_stat.h:4,
                       from kernel/timer.c:22:
      include/asm/spinlock.h: In function '__raw_spin_lock':
      include/asm/spinlock.h:69: error: implicit declaration of function 'smp_processor_id'
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ba8dd03a
  20. 26 6月, 2008 3 次提交
  21. 30 1月, 2008 1 次提交
    • A
      x86: optimize lock prefix switching to run less frequently · ca74a6f8
      Andi Kleen 提交于
      On VMs implemented using JITs that cache translated code changing the lock
      prefixes is a quite costly operation that forces the JIT to throw away and
      retranslate a lot of code.
      
      Previously a SMP kernel would rewrite the locks once for each CPU which
      is quite unnecessary. This patch changes the code to never switch at boot in
       the normal case (SMP kernel booting with >1 CPU) or only once for SMP kernel
      on UP.
      
      This makes a significant difference in boot up performance on AMD SimNow!
      Also I expect it to be a little faster on native systems too because a smp
      switch does a lot of text_poke()s which each synchronize the pipeline.
      
      v1->v2: Rename max_cpus
      v1->v2: Fix off by one in UP check (Thomas Gleixner)
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ca74a6f8
  22. 10 11月, 2007 1 次提交
    • I
      KVM: fix !SMP build error · a5fbb6d1
      Ingo Molnar 提交于
      fix a !SMP build error:
      
      drivers/kvm/kvm_main.c: In function 'kvm_flush_remote_tlbs':
      drivers/kvm/kvm_main.c:220: error: implicit declaration of function 'smp_call_function_mask'
      
      (and also avoid unused function warning related to up_smp_call_function()
      not making use of the 'func' parameter.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a5fbb6d1
  23. 18 7月, 2007 1 次提交
  24. 16 7月, 2007 1 次提交
  25. 17 5月, 2007 1 次提交
  26. 10 5月, 2007 1 次提交
  27. 08 12月, 2006 1 次提交
  28. 26 9月, 2006 1 次提交
  29. 01 7月, 2006 1 次提交
    • A
      [PATCH] add smp_setup_processor_id() · 033ab7f8
      Andrew Morton 提交于
      Presently, smp_processor_id() isn't necessarily set up until setup_arch().
      But it's used in boot_cpu_init() and printk() and perhaps in other places,
      prior to setup_arch() being called.
      
      So provide a new smp_setup_processor_id() which is called before anything
      else, wire it up for Voyager (which boots on a CPU other than #0, and broke).
      
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      033ab7f8
  30. 26 4月, 2006 1 次提交
  31. 27 3月, 2006 1 次提交
  32. 22 3月, 2006 1 次提交
    • A
      [PATCH] on_each_cpu(): disable local interrupts · 78eef01b
      Andrew Morton 提交于
      When on_each_cpu() runs the callback on other CPUs, it runs with local
      interrupts disabled.  So we should run the function with local interrupts
      disabled on this CPU, too.
      
      And do the same for UP, so the callback is run in the same environment on both
      UP and SMP.  (strictly it should do preempt_disable() too, but I think
      local_irq_disable is sufficiently equivalent).
      
      Also uninlines on_each_cpu().  softirq.c was the most appropriate file I could
      find, but it doesn't seem to justify creating a new file.
      
      Oh, and fix up that comment over (under?) x86's smp_call_function().  It
      drives me nuts.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      78eef01b
  33. 08 2月, 2006 1 次提交
  34. 24 11月, 2005 1 次提交
  35. 23 11月, 2005 1 次提交
  36. 29 7月, 2005 1 次提交
    • L
      Revert broken "statement with no effect" warning fix · 2ac6608c
      Linus Torvalds 提交于
      It may shut up gcc, but it also incorrectly changes the semantics of the
      smp_call_function() helpers.
      
      You can fix the warning other ways if you are interested (create another
      inline function that takes no arguments and returns zero), but
      preferably gcc just shouldn't complain about unused return values from
      statement expressions in the first place.
      2ac6608c