1. 13 3月, 2012 1 次提交
    • P
      sched: Cleanup cpu_active madness · 5fbd036b
      Peter Zijlstra 提交于
      Stepan found:
      
      CPU0		CPUn
      
      _cpu_up()
        __cpu_up()
      
      		boostrap()
      		  notify_cpu_starting()
      		  set_cpu_online()
      		  while (!cpu_active())
      		    cpu_relax()
      
      <PREEMPT-out>
      
      smp_call_function(.wait=1)
        /* we find cpu_online() is true */
        arch_send_call_function_ipi_mask()
      
        /* wait-forever-more */
      
      <PREEMPT-in>
      		  local_irq_enable()
      
        cpu_notify(CPU_ONLINE)
          sched_cpu_active()
            set_cpu_active()
      
      Now the purpose of cpu_active is mostly with bringing down a cpu, where
      we mark it !active to avoid the load-balancer from moving tasks to it
      while we tear down the cpu. This is required because we only update the
      sched_domain tree after we brought the cpu-down. And this is needed so
      that some tasks can still run while we bring it down, we just don't want
      new tasks to appear.
      
      On cpu-up however the sched_domain tree doesn't yet include the new cpu,
      so its invisible to the load-balancer, regardless of the active state.
      So instead of setting the active state after we boot the new cpu (and
      consequently having to wait for it before enabling interrupts) set the
      cpu active before we set it online and avoid the whole mess.
      Reported-by: NStepan Moskovchenko <stepanm@codeaurora.org>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1323965362.18942.71.camel@twinsSigned-off-by: NIngo Molnar <mingo@elte.hu>
      5fbd036b
  2. 27 12月, 2011 6 次提交
    • M
      [S390] outstanding interrupts vs. smp_send_stop · 85ac7ca5
      Martin Schwidefsky 提交于
      The panic function will first print the panic message to the console,
      then stop additional cpus with smp_send_stop and finally call the
      function on the panic notifier list.
      In case of an I/O based console the panic message will cause I/O to
      be started and a function on the panic notifier list will wait for the
      completion of the I/O. That does not work if an I/O completion interrupt
      has already been delivered to a cpu that is then stopped by smp_send_stop.
      To break this cyclic dependency add code to smp_send_stop that gives
      the additional cpu the opportunity to complete outstanding interrupts.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      85ac7ca5
    • H
      [S390] topology: increase poll frequency if change is anticipated · d68bddb7
      Heiko Carstens 提交于
      Increase cpu topology change poll frequency if a change is anticipated.
      Otherwise a user might be a bit confused to have to wait up to a minute
      in order to see a change this should be visible immediatly.
      However there is no guarantee that the change will happen during the
      time frame the poll frequency is increased.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d68bddb7
    • M
      [S390] entry[64].S improvements · c5328901
      Martin Schwidefsky 提交于
      Another round of cleanup for entry[64].S, in particular the program check
      handler looks more reasonable now. The code size for the 31 bit kernel
      has been reduced by 616 byte and by 528 byte for the 64 bit version.
      Even better the code is a bit faster as well.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c5328901
    • H
      [S390] topology: get rid of ifdefs · 83a24e32
      Heiko Carstens 提交于
      Remove all ifdefs from topology code and also only compile it for the
      CONFIG_SCHED_BOOK case. The new code selects SCHED_MC if SCHED_BOOK is
      selected. SCHED_MC without SCHED_BOOK is not possible anymore.
      Furthermore various sysfs attributes are not available anymore for the
      !SCHED_BOOK case. In particular all attributes that correspond to
      CPU polarization.
      But since all real world kernels have SCHED_BOOK selected anyway this
      doesn't matter too much.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      83a24e32
    • M
      [S390] kernel: Fix smp_switch_to_ipl_cpu() stack frame setup · 3931723f
      Michael Holzheu 提交于
      Currently, when smp_switch_to_ipl_cpu() is done, the backchain in the dump
      analysis tool crash looks like the following:
      
       #0 [1f746e70] __machine_kexec at 11dd92
       #1 [1f746eb8] smp_restart_cpu at 11820e
       #0 [00907eb0] cpu_idle at 10602e
       #1 [00907ef8] start_kernel at 979a08
      
      It would be good to see the registers of the interrupted function.
      To achieve this, the backchain on the new stack has to be set to zero.
      This looks then like the following:
      
       #0 [1f746e70] __machine_kexec at 11dd8e
       #1 [1f746eb8] smp_restart_cpu at 11820a
       PSW:  0706000180000000 00000000005c6fe6 (vtime_stop_cpu+134)
       GPRS: 0000000000000000 00000000005c6fe6 0000000001ad0228 0000000001ad0248
             0000000000907f08 0000000001ad0b40 0000000000979344 0000000000000000
             00000000009c0000 00000000009c0010 00000000009ab024 0000000001ad0200
             0000000001ad0238 00000000005cc9d8 000000000010602e 0000000000907e68
       #0 [00907eb0] cpu_idle at 10602e
       #1 [00907ef8] start_kernel at 979a08
      
      In addition to this, now also the correct PSW is stored in the pt_regs
      structure that is located at the start of the panic stack.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3931723f
    • H
      [S390] irq: fix accounting of external call/emergency signal · 272f01bf
      Heiko Carstens 提交于
      Mask the extint_code parameter of the smp external interrupt handler
      to get the interruption code. Otherwise emergency call interrupts
      erroneously might be accounted as emergency signal interrupts.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      272f01bf
  3. 22 12月, 2011 1 次提交
    • K
      cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem · 8a25a2fd
      Kay Sievers 提交于
      This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
      and converts the devices to regular devices. The sysdev drivers are
      implemented as subsystem interfaces now.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Userspace relies on events and generic sysfs subsystem infrastructure
      from sysdev devices, which are made available with this conversion.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8a25a2fd
  4. 30 10月, 2011 5 次提交
  5. 03 8月, 2011 3 次提交
  6. 24 7月, 2011 1 次提交
  7. 22 6月, 2011 1 次提交
  8. 26 5月, 2011 1 次提交
  9. 23 5月, 2011 3 次提交
  10. 14 4月, 2011 1 次提交
  11. 05 1月, 2011 4 次提交
  12. 25 10月, 2010 2 次提交
  13. 24 8月, 2010 1 次提交
    • M
      [S390] fix tlb flushing vs. concurrent /proc accesses · 050eef36
      Martin Schwidefsky 提交于
      The tlb flushing code uses the mm_users field of the mm_struct to
      decide if each page table entry needs to be flushed individually with
      IPTE or if a global flush for the mm_struct is sufficient after all page
      table updates have been done. The comment for mm_users says "How many
      users with user space?" but the /proc code increases mm_users after it
      found the process structure by pid without creating a new user process.
      Which makes mm_users useless for the decision between the two tlb
      flusing methods. The current code can be confused to not flush tlb
      entries by a concurrent access to /proc files if e.g. a fork is in
      progres. The solution for this problem is to make the tlb flushing
      logic independent from the mm_users field.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      050eef36
  14. 28 5月, 2010 1 次提交
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 24 3月, 2010 1 次提交
  17. 08 3月, 2010 2 次提交
  18. 27 2月, 2010 4 次提交
  19. 14 1月, 2010 1 次提交