1. 11 Apr, 2011 7 commits
    • Peter Zijlstra's avatar
      sched: Change NODE sched_domain group creation · cd4ea6ae
      Peter Zijlstra authored
      The NODE sched_domain is 'special' in that it allocates sched_groups
      per CPU, instead of sharing the sched_groups between all CPUs.
      
      While this might have some benefits on large NUMA and avoid remote
      memory accesses when iterating the sched_groups, this does break
      current code that assumes sched_groups are shared between all
      sched_domains (since the dynamic cpu_power patches).
      
      So refactor the NODE groups to behave like all other groups.
      
      (The ALLNODES domain again shared its groups across the CPUs for some
      reason).
      
      If someone does measure a performance decrease due to this change we
      need to revisit this and come up with another way to have both dynamic
      cpu_power and NUMA work nice together.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20110407122941.978111700@chello.nlSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      cd4ea6ae
    • Peter Zijlstra's avatar
      sched: Simplify build_sched_groups() · a06dadbe
      Peter Zijlstra authored
      Notice that the mask being computed is the same as the domain span we
      just computed. By using the domain_span we can avoid some mask
      allocations and computations.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20110407122941.925028189@chello.nlSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a06dadbe
    • Peter Zijlstra's avatar
      sched: Simplify ->cpu_power initialization · d274cb30
      Peter Zijlstra authored
      The code in update_group_power() does what init_sched_groups_power()
      does and more, so remove the special init_ code and call the generic
      code instead.
      
      Also move the sd->span_weight initialization because
      update_group_power() needs it.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20110407122941.875856012@chello.nlSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d274cb30
    • Peter Zijlstra's avatar
      sched: Remove obsolete arch_ prefixes · c4a8849a
      Peter Zijlstra authored
      Non weak static functions clearly are not arch specific, so remove the
      arch_ prefix.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20110407122941.820460566@chello.nlSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c4a8849a
    • Shaohua Li's avatar
      sched: Eliminate dead code from wakeup_gran() · f4ad9bd2
      Shaohua Li authored
      calc_delta_fair() checks NICE_0_LOAD already, delete duplicate check.
      
      Signed-off-by: Shaohua Li<shaohua.li@intel.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Link: http://lkml.kernel.org/r/1302238389.3981.92.camel@sli10-conroeSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f4ad9bd2
    • Ken Chen's avatar
      sched: Fix erroneous all_pinned logic · b30aef17
      Ken Chen authored
      The scheduler load balancer has specific code to deal with cases of
      unbalanced system due to lots of unmovable tasks (for example because of
      hard CPU affinity). In those situation, it excludes the busiest CPU that
      has pinned tasks for load balance consideration such that it can perform
      second 2nd load balance pass on the rest of the system.
      
      This all works as designed if there is only one cgroup in the system.
      
      However, when we have multiple cgroups, this logic has false positives and
      triggers multiple load balance passes despite there are actually no pinned
      tasks at all.
      
      The reason it has false positives is that the all pinned logic is deep in
      the lowest function of can_migrate_task() and is too low level:
      
      load_balance_fair() iterates each task group and calls balance_tasks() to
      migrate target load. Along the way, balance_tasks() will also set a
      all_pinned variable. Given that task-groups are iterated, this all_pinned
      variable is essentially the status of last group in the scanning process.
      Task group can have number of reasons that no load being migrated, none
      due to cpu affinity. However, this status bit is being propagated back up
      to the higher level load_balance(), which incorrectly think that no tasks
      were moved.  It kick off the all pinned logic and start multiple passes
      attempt to move load onto puller CPU.
      
      To fix this, move the all_pinned aggregation up at the iterator level.
      This ensures that the status is aggregated over all task-groups, not just
      last one in the list.
      Signed-off-by: default avatarKen Chen <kenchen@google.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/BANLkTi=ernzNawaR5tJZEsV_QVnfxqXmsQ@mail.gmail.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b30aef17
    • Ken Chen's avatar
      sched: Fix sched-domain avg_load calculation · b0432d8f
      Ken Chen authored
      In function find_busiest_group(), the sched-domain avg_load isn't
      calculated at all if there is a group imbalance within the domain. This
      will cause erroneous imbalance calculation.
      
      The reason is that calculate_imbalance() sees sds->avg_load = 0 and it
      will dump entire sds->max_load into imbalance variable, which is used
      later on to migrate entire load from busiest CPU to the puller CPU.
      
      This has two really bad effect:
      
      1. stampede of task migration, and they won't be able to break out
         of the bad state because of positive feedback loop: large load
         delta -> heavier load migration -> larger imbalance and the cycle
         goes on.
      
      2. severe imbalance in CPU queue depth.  This causes really long
         scheduling latency blip which affects badly on application that
         has tight latency requirement.
      
      The fix is to have kernel calculate domain avg_load in both cases. This
      will ensure that imbalance calculation is always sensible and the target
      is usually half way between busiest and puller CPU.
      Signed-off-by: default avatarKen Chen <kenchen@google.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/r/20110408002322.3A0D812217F@elm.corp.google.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b0432d8f
  2. 10 Apr, 2011 1 commit
  3. 09 Apr, 2011 3 commits
  4. 08 Apr, 2011 4 commits
  5. 07 Apr, 2011 19 commits
  6. 06 Apr, 2011 6 commits
    • Hans Rosenfeld's avatar
      x86-32, fpu: Fix FPU exception handling on non-SSE systems · f994d99c
      Hans Rosenfeld authored
      On 32bit systems without SSE (that is, they use FSAVE/FRSTOR for FPU
      context switches), FPU exceptions in user mode cause Oopses, BUGs,
      recursive faults and other nasty things:
      
      fpu exception: 0000 [#1]
      last sysfs file: /sys/power/state
      Modules linked in: psmouse evdev pcspkr serio_raw [last unloaded: scsi_wait_scan]
      
      Pid: 1638, comm: fxsave-32-excep Not tainted 2.6.35-07798-g58a992b9-dirty #633 VP3-596B-DD/VT82C597
      EIP: 0060:[<c1003527>] EFLAGS: 00010202 CPU: 0
      EIP is at math_error+0x1b4/0x1c8
      EAX: 00000003 EBX: cf9be7e0 ECX: 00000000 EDX: cf9c5c00
      ESI: cf9d9fb4 EDI: c1372db3 EBP: 00000010 ESP: cf9d9f1c
      DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
      Process fxsave-32-excep (pid: 1638, ti=cf9d8000 task=cf9be7e0 task.ti=cf9d8000)
      Stack:
      00000000 00000301 00000004 00000000 00000000 cf9d3000 cf9da8f0 00000001
      <0> 00000004 cf9b6b60 c1019a6b c1019a79 00000020 00000242 000001b6 cf9c5380
      <0> cf806b40 cf791880 00000000 00000282 00000282 c108a213 00000020 cf9c5380
      Call Trace:
      [<c1019a6b>] ? need_resched+0x11/0x1a
      [<c1019a79>] ? should_resched+0x5/0x1f
      [<c108a213>] ? do_sys_open+0xbd/0xc7
      [<c108a213>] ? do_sys_open+0xbd/0xc7
      [<c100353b>] ? do_coprocessor_error+0x0/0x11
      [<c12d5965>] ? error_code+0x65/0x70
      Code: a8 20 74 30 c7 44 24 0c 06 00 03 00 8d 54 24 04 89 d9 b8 08 00 00 00 e8 9b 6d 02 00 eb 16 8b 93 5c 02 00 00 eb 05 e9 04 ff ff ff <9b> dd 32 9b e9 16 ff ff ff 81 c4 84 00 00 00 5b 5e 5f 5d c3 c6
      EIP: [<c1003527>] math_error+0x1b4/0x1c8 SS:ESP 0068:cf9d9f1c
      
      This usually continues in slight variations until the system is reset.
      
      This bug was introduced by commit 58a992b9:
      	x86-32, fpu: Rewrite fpu_save_init()
      Signed-off-by: default avatarHans Rosenfeld <hans.rosenfeld@amd.com>
      Link: http://lkml.kernel.org/r/1302106003-366952-1-git-send-email-hans.rosenfeld@amd.comSigned-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      f994d99c
    • Arjan Mels's avatar
      staging: usbip: bugfix for isochronous packets and optimization · 28276a28
      Arjan Mels authored
      For isochronous packets the actual_length is the sum of the actual
      length of each of the packets, however between the packets might be
      padding, so it is not sufficient to just send the first actual_length
      bytes of the buffer. To fix this and simultanesouly optimize the
      bandwidth the content of the isochronous packets are send without the
      padding, the padding is restored on the receiving end.
      Signed-off-by: default avatarArjan Mels <arjan.mels@gmx.net>
      Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
      Cc: Max Vozeler <max@vozeler.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      28276a28
    • Arjan Mels's avatar
      staging: usbip: bugfix add number of packets for isochronous frames · 1325f85f
      Arjan Mels authored
      The number_of_packets was not transmitted for RET_SUBMIT packets. The
      linux client used the stored number_of_packet from the submitted
      request. The windows userland client does not do this however and needs
      to know the number_of_packets to determine the size of the transmission.
      Signed-off-by: default avatarArjan Mels <arjan.mels@gmx.net>
      Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
      Cc: Max Vozeler <max@vozeler.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1325f85f
    • Arjan Mels's avatar
      staging: usbip: bugfixes related to kthread conversion · d2dd0b07
      Arjan Mels authored
      When doing a usb port reset do a queued reset instead to prevent a
      deadlock: the reset will cause the driver to unbind, causing the
      usb_driver_lock_for_reset to stall.
      Signed-off-by: default avatarArjan Mels <arjan.mels@gmx.net>
      Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
      Cc: Max Vozeler <max@vozeler.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d2dd0b07
    • Arjan Mels's avatar
      staging: usbip: fix shutdown problems. · 2f8c4c54
      Arjan Mels authored
      When shuting down the tcp_rx and tcp_tx threads first check if they are
      not closed already (maybe because an error caused them to return).
      Signed-off-by: default avatarArjan Mels <arjan.mels@gmx.net>
      Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
      Cc: Max Vozeler <max@vozeler.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2f8c4c54
    • Haiyang Zhang's avatar
      staging: hv: Fix GARP not sent after Quick Migration · c996edcf
      Haiyang Zhang authored
      After Quick Migration, the network is not immediately operational in the
      current context when receiving RNDIS_STATUS_MEDIA_CONNECT event. So, I added
      another netif_notify_peers() into a scheduled work, otherwise GARP packet will
      not be sent after quick migration, and cause network disconnection.
      
      Thanks to Mike Surcouf <mike@surcouf.co.uk> for reporting the bug and
      testing the patch.
      Reported-by: default avatarMike Surcouf <mike@surcouf.co.uk>
      Tested-by: default avatarMike Surcouf <mike@surcouf.co.uk>
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
      Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c996edcf