18 Dec, 2007

1 commit

  • This following commit

    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fdf8cb0909b531f9ae8f9b9d7e4eb35ba3505f07

    un-inlined a low-level rwsem function, but did not mark it as __sched.
    The result is that it now shows up as thread wchan (which also affects
    /proc/profile stats). The following simple patch fixes this by properly
    marking rwsem_down_failed_common() as a __sched function.

    Also in this patch, which is up for discussion, marks down_read() and
    down_write() proper as __sched. For profiling, it is pretty much
    useless to know that a semaphore is beig help - it is necessary to know
    _which_ one. By going up another frame on the stack, the information
    becomes much more useful.

    In summary, the below change to lib/rwsem.c should be applied; the
    changes to kernel/rwsem.c could be applied if other kernel hackers agree
    with my proposal that down_read()/down_write() in the profile is not
    enough.

    [ akpm@linux-foundation.org: build fix ]

    Signed-off-by: Livio Soares
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Livio Soares
     

20 Jul, 2007

1 commit


09 May, 2007

1 commit

  • This causes constructions like

    down_write(&mm1->mmap_sem);
    if (down_write_trylock(&mm2->mmap_sem)) {
    ...
    up_write(&mm2->mmap_sem);
    }
    up_write(&mm1->mmap_sem);

    generate a lockdep warning about circular locking dependence.

    Call rwsem_acquire() with trylock set to 1.

    Cc: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     

04 Jul, 2006

2 commits