1. 26 9月, 2012 3 次提交
  2. 20 7月, 2012 1 次提交
    • H
      s390/comments: unify copyright messages and remove file names · a53c8fab
      Heiko Carstens 提交于
      Remove the file name from the comment at top of many files. In most
      cases the file name was wrong anyway, so it's rather pointless.
      
      Also unify the IBM copyright statement. We did have a lot of sightly
      different statements and wanted to change them one after another
      whenever a file gets touched. However that never happened. Instead
      people start to take the old/"wrong" statements to use as a template
      for new files.
      So unify all of them in one go.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      a53c8fab
  3. 11 3月, 2012 1 次提交
    • M
      [S390] rework smp code · 8b646bd7
      Martin Schwidefsky 提交于
      Define struct pcpu and merge some of the NR_CPUS arrays into it, including
      __cpu_logical_map, current_set and smp_cpu_state. Split smp related
      functions to those operating on physical cpus and the functions operating
      on a logical cpu number. Make the functions for physical cpus use a
      pointer to a struct pcpu. This hides the knowledge about cpu addresses in
      smp.c, entry[64].S and swsusp_asm64.S, thus remove the sigp.h header.
      
      The PSW restart mechanism is used to start secondary cpus, calling a
      function on an online cpu, calling a function on the ipl cpu, and for
      the nmi signal. Replace the different assembler functions with a
      single function restart_int_handler. The new entry point calls a function
      whose pointer is stored in the lowcore of the target cpu and it can wait
      for the source cpu to stop. This covers all existing use cases.
      
      Overall the code is now simpler and there are ~380 lines less code.
      Reviewed-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8b646bd7
  4. 27 12月, 2011 3 次提交
  5. 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
  6. 14 11月, 2011 1 次提交
  7. 30 10月, 2011 1 次提交
  8. 26 5月, 2011 1 次提交
  9. 23 5月, 2011 1 次提交
  10. 29 10月, 2010 1 次提交
  11. 25 10月, 2010 5 次提交
  12. 10 9月, 2010 1 次提交
  13. 17 5月, 2010 1 次提交
  14. 09 4月, 2010 1 次提交
  15. 14 1月, 2010 1 次提交
  16. 26 3月, 2009 1 次提交
  17. 26 12月, 2008 1 次提交
  18. 25 12月, 2008 5 次提交
  19. 12 12月, 2008 1 次提交
  20. 15 11月, 2008 1 次提交
  21. 26 7月, 2008 1 次提交
  22. 14 7月, 2008 1 次提交
  23. 30 4月, 2008 2 次提交
    • H
      [S390] cpu topology: Fix possible deadlock. · fd781fa2
      Heiko Carstens 提交于
      When we get a notification that cpu topology changed, we schedule a
      work struct which just calls arch_reinit_sched_domains. This function
      in turn calls get_online_cpus() which results int the lockdep warning
      below.
      
      After all it turnded out that it's not legal to call get_online_cpus()
      from the context of a multi-threaded work queue.
      It could deadlock this way:
      
      process 0 (events/cpu-x):
      -> run_workqueue
      -> removes my work_struct from the work queue
      -> calls work_struct->fn
      -> get_online_cpus()
      -> locks on cpu_hotplug.lock since process 1 below is doing cpu hotplug
      
      process 1:
      -> cpu_down (for cpu-x)
      -> cpu_hotplug_begin (holds cpu_hotplug.lock now)
      -> cpu-x dead
      -> notifier_call_chain with CPU_DEAD
      -> cleanup_workqueue_thread
      -> flush_cpu_workqueue (succeeds)
      -> kthread_stop for events/cpu-x
        -> now kthread_stop waits for my work_struct to complete from within
           process 0. -> dead.
      
      A single threaded workqueue wouldn't have such problems, however there is
      no such common queue available and it's not worth to create one for the
      very rare calls to arch_reinit_sched_domains.
      
      So we just create a kernel thread from our work struct which calls
      arch_reinit_sched_domains and are done with it.
      
      Thanks to Oleg Nesterov and Peter Zijlstra for helping me figuring out
      that this isn't a false positive lockdep warning:
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.25-03562-g3dc50637-dirty #12
      -------------------------------------------------------
      events/3/14 is trying to acquire lock:
       (&cpu_hotplug.lock){--..}, at: [<0000000000076094>] get_online_cpus+0x50/0x78
      
      but task is already holding lock:
       (topology_work){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #2 (topology_work){--..}:
             [<000000000006fc74>] __lock_acquire+0x1010/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<0000000000059d48>] run_workqueue+0x170/0x278
             [<0000000000059edc>] worker_thread+0x8c/0xf0
             [<000000000005f5bc>] kthread+0x68/0xa0
             [<000000000001a33e>] kernel_thread_starter+0x6/0xc
             [<000000000001a338>] kernel_thread_starter+0x0/0xc
      
      -> #1 (events){--..}:
             [<000000000006fc74>] __lock_acquire+0x1010/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<000000000005a23c>] cleanup_workqueue_thread+0x60/0xa8
             [<00000000003b2ab8>] workqueue_cpu_callback+0xbc/0x170
             [<00000000003bba80>] notifier_call_chain+0x5c/0xa4
             [<00000000000655a2>] __raw_notifier_call_chain+0x26/0x38
             [<00000000000655e2>] raw_notifier_call_chain+0x2e/0x40
             [<0000000000075e00>] cpu_down+0x228/0x31c
             [<00000000003b1dd8>] store_online+0x64/0xb8
             [<00000000001e7128>] sysdev_store+0x48/0x58
             [<0000000000121cd2>] sysfs_write_file+0x126/0x1c0
             [<00000000000c1944>] vfs_write+0xb0/0x15c
             [<00000000000c20e6>] sys_write+0x56/0x88
             [<0000000000027a68>] sys32_write+0x34/0x4c
             [<0000000000023f70>] sysc_noemu+0x10/0x16
             [<0000000077f3f186>] 0x77f3f186
      
      -> #0 (&cpu_hotplug.lock){--..}:
             [<000000000006fa84>] __lock_acquire+0xe20/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<00000000003b701c>] mutex_lock_nested+0xd0/0x364
             [<0000000000076094>] get_online_cpus+0x50/0x78
             [<000000000003a03e>] arch_reinit_sched_domains+0x26/0x58
             [<000000000002700e>] topology_work_fn+0x26/0x34
             [<0000000000059d4e>] run_workqueue+0x176/0x278
             [<0000000000059edc>] worker_thread+0x8c/0xf0
             [<000000000005f5bc>] kthread+0x68/0xa0
             [<000000000001a33e>] kernel_thread_starter+0x6/0xc
             [<000000000001a338>] kernel_thread_starter+0x0/0xc
      
      other info that might help us debug this:
      
      2 locks held by events/3/14:
       #0:  (events){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
       #1:  (topology_work){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
      
      stack backtrace:
      CPU: 3 Not tainted 2.6.25-03562-g3dc50637-dirty #12
      Process events/3 (pid: 14, task: 000000002fb04038, ksp: 000000002fb0bd70)
      0400000000000000 000000002fb0ba40 0000000000000002 0000000000000000
             000000002fb0bae0 000000002fb0ba58 000000002fb0ba58 0000000000016488
             0000000000000000 000000002fb0bd70 0000000000000000 0000000000000000
             000000002fb0ba40 000000000000000c 000000002fb0ba40 000000002fb0bab0
             00000000003c99e0 0000000000016488 000000002fb0ba40 000000002fb0ba90
      Call Trace:
      ([<00000000000163fc>] show_trace+0x138/0x158)
       [<00000000000164e2>] show_stack+0xc6/0xf8
       [<0000000000016624>] dump_stack+0xb0/0xc0
       [<000000000006cd36>] print_circular_bug_tail+0xa2/0xb4
       [<000000000006fa84>] __lock_acquire+0xe20/0x111c
       [<000000000006fe40>] lock_acquire+0xc0/0xf8
       [<00000000003b701c>] mutex_lock_nested+0xd0/0x364
       [<0000000000076094>] get_online_cpus+0x50/0x78
       [<000000000003a03e>] arch_reinit_sched_domains+0x26/0x58
       [<000000000002700e>] topology_work_fn+0x26/0x34
       [<0000000000059d4e>] run_workqueue+0x176/0x278
       [<0000000000059edc>] worker_thread+0x8c/0xf0
       [<000000000005f5bc>] kthread+0x68/0xa0
       [<000000000001a33e>] kernel_thread_starter+0x6/0xc
       [<000000000001a338>] kernel_thread_starter+0x0/0xc
      INFO: lockdep is turned off.
      
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fd781fa2
    • H
      [S390] Add topology_core_siblings to topology.h · d00aa4e7
      Heiko Carstens 提交于
      This exposes the core siblings to user space via sysfs.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      d00aa4e7
  24. 17 4月, 2008 2 次提交
    • H
      [S390] Vertical cpu management. · c10fde0d
      Heiko Carstens 提交于
      If vertical cpu polarization is active then the hypervisor will
      dispatch certain cpus for a longer time than other cpus for maximum
      performance. For example if a guest would have three virtual cpus,
      each of them with a share of 33 percent, then in case of vertical
      cpu polarization all of the processing time would be combined to a
      single cpu which would run all the time, while the other two cpus
      would get nearly no cpu time.
      
      There are three different types of vertical cpus: high, medium and
      low. Low cpus hardly get any real cpu time, while high cpus get a
      full real cpu. Medium cpus get something in between.
      
      In order to switch between the two possible modes (default is
      horizontal) a 0 for horizontal polarization or a 1 for vertical
      polarization must be written to the dispatching sysfs attribute:
      
      /sys/devices/system/cpu/dispatching
      
      The polarization of each single cpu can be figured out by the
      polarization sysfs attribute of each cpu:
      
      /sys/devices/system/cpu/cpuX/polarization
      
      horizontal, vertical:high, vertical:medium, vertical:low or unknown.
      
      When switching polarization the polarization attribute may contain
      the value unknown until the configuration change is done and the
      kernel has figured out the new polarization of each cpu.
      
      Note that running a system with different types of vertical cpus may
      result in significant performance regressions. If possible only one
      type of vertical cpus should be used. All other cpus should be
      offlined.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      c10fde0d
    • H
      [S390] cpu topology support for s390. · dbd70fb4
      Heiko Carstens 提交于
      Add s390 backend so we can give the scheduler some hints about the
      cpu topology.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      dbd70fb4