1. 23 May, 2008 4 commits
    • Christian Borntraeger's avatar
      stop_machine: make stop_machine_run more virtualization friendly · 3401a61e
      Christian Borntraeger authored
      On kvm I have seen some rare hangs in stop_machine when I used more guest
      cpus than hosts cpus. e.g. 32 guest cpus on 1 host cpu triggered the
      hang quite often. I could also reproduce the problem on a 4 way z/VM host with
      a 64 way guest.
      
      It turned out that the guest was consuming all available cpus mostly for
      spinning on scheduler locks like rq->lock. This is expected as the threads are
      calling yield all the time.
      The problem is now, that the host scheduling decisings together with the guest
      scheduling decisions and spinlocks not being fair managed to create an
      interesting scenario similar to a live lock. (Sometimes the hang resolved
      itself after some minutes)
      
      Changing stop_machine to yield the cpu to the hypervisor when yielding inside
      the guest fixed the problem for me. While I am not completely happy with this
      patch, I think it causes no harm and it really improves the situation for me.
      
      I used cpu_relax for yielding to the hypervisor, does that work on all
      architectures?
      
      p.s.: If you want to reproduce the problem, cpu hotplug and kprobes use
      stop_machine_run and both triggered the problem after some retries.
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      CC: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      3401a61e
    • Matti Linnanvuori's avatar
      doc: add a chapter about trylock functions [Bug 9011] · 4d2e7d0d
      Matti Linnanvuori authored
      Add a chapter about trylock functions.
      http://bugzilla.kernel.org/show_bug.cgi?id=9011Signed-off-by: default avatarMatti Linnanvuori <mattilinnanvuori@yahoo.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed down_trylock)
      4d2e7d0d
    • Denis V. Lunev's avatar
      modules: proper cleanup of kobject without CONFIG_SYSFS · 34e4e2fe
      Denis V. Lunev authored
      kobject: '<NULL>' (ffffffffa0104050): is not initialized, yet kobject_put() is being called.
      ------------[ cut here ]------------
      WARNING: at /home/den/src/linux-netns26/lib/kobject.c:583 kobject_put+0x53/0x55()
      Modules linked in: ipv6 nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs ide_cd_mod cdrom button [last unloaded: pktgen]
      comm: rmmod Tainted: G        W 2.6.26-rc3 #585
      Call Trace:
        [<ffffffff802359ab>] warn_on_slowpath+0x58/0x7a
        [<ffffffff80236aca>] ? printk+0x67/0x69
        [<ffffffff80236aca>] ? printk+0x67/0x69
        [<ffffffff80324289>] kobject_put+0x53/0x55
        [<ffffffff8025e2ee>] free_module+0x87/0xfa
        [<ffffffff8025fee5>] sys_delete_module+0x178/0x1e1
        [<ffffffff804b1e70>] ? lockdep_sys_exit_thunk+0x35/0x67
        [<ffffffff804b1dff>] ? trace_hardirqs_on_thunk+0x35/0x3a
        [<ffffffff8020c0bb>] system_call_after_swapgs+0x7b/0x80
      ---[ end trace 8f5aafa7f6406cf8 ]---
      
      mod->mkobj.kobj is not initialized without CONFIG_SYSFS. Do not call
      kobject_put in this case.
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      34e4e2fe
    • Cyrill Gorcunov's avatar
  2. 21 May, 2008 25 commits
  3. 20 May, 2008 11 commits