30 Sep, 2006

1 commit

  • Oleg brought up some interesting points about grabbing the pi_lock for some
    protections. In this discussion, I realized that there are some places
    that the pi_lock is being grabbed when it really wasn't necessary. Also
    this patch does a little bit of clean up.

    This patch basically does three things:

    1) renames the "boost" variable to "chain_walk". Since it is used in
    the debugging case when it isn't going to be boosted. It better
    describes what the test is going to do if it succeeds.

    2) moves get_task_struct to just before the unlocking of the wait_lock.
    This removes duplicate code, and makes it a little easier to read. The
    owner wont go away while either the pi_lock or the wait_lock are held.

    3) removes the pi_locking and owner blocked checking completely from the
    debugging case. This is because the grabbing the lock and doing the
    check, then releasing the lock is just so full of races. It's just as
    good to go ahead and call the pi_chain_walk function, since after
    releasing the lock the owner can then block anyway, and we would have
    missed that. For the debug case, we really do want to do the chain walk
    to test for deadlocks anyway.

    [oleg@tv-sign.ru: more of the same]
    Signed-of-by: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Oleg Nesterov
    Cc: Esben Nielsen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     

01 Aug, 2006

1 commit

  • In order to prevent Doc Rot, this patch adds a reference to the design
    document for rtmutex.c in rtmutex.c. So when someone needs to update or
    change the design of that file they will know that a document actually
    exists that explains the design (helping them change it), and hopefully
    that they will update the document if they too change the design.

    Signed-off-by: Steven Rostedt
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     

04 Jul, 2006

2 commits

  • cleanup: remove task_t and convert all the uses to struct task_struct. I
    introduced it for the scheduler anno and it was a mistake.

    Conversion was mostly scripted, the result was reviewed and all
    secondary whitespace and style impact (if any) was fixed up by hand.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Generic lock debugging:

    - generalized lock debugging framework. For example, a bug in one lock
    subsystem turns off debugging in all lock subsystems.

    - got rid of the caller address passing (__IP__/__IP_DECL__/etc.) from
    the mutex/rtmutex debugging code: it caused way too much prototype
    hackery, and lockdep will give the same information anyway.

    - ability to do silent tests

    - check lock freeing in vfree too.

    - more finegrained debugging options, to allow distributions to
    turn off more expensive debugging features.

    There's no separate 'held mutexes' list anymore - but there's a 'held locks'
    stack within lockdep, which unifies deadlock detection across all lock
    classes. (this is independent of the lockdep validation stuff - lockdep first
    checks whether we are holding a lock already)

    Here are the current debugging options:

    CONFIG_DEBUG_MUTEXES=y
    CONFIG_DEBUG_LOCK_ALLOC=y

    which do:

    config DEBUG_MUTEXES
    bool "Mutex debugging, basic checks"

    config DEBUG_LOCK_ALLOC
    bool "Detect incorrect freeing of live mutexes"

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

    Ingo Molnar
     

28 Jun, 2006

4 commits

  • When the priority of a task, which is blocked on a lock, changes we must
    propagate this change into the PI lock chain. Therefor the chain walk code
    is changed to get rid of the references to current to avoid false positives
    in the deadlock detector, as setscheduler might be called by a task which
    holds the lock on which the task whose priority is changed is blocked.

    Also add some comments about the get/put_task_struct usage to avoid
    confusion.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Add proxy-locking rt-mutex functionality needed by pi-futexes.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • RT-mutex tester: scriptable tester for rt mutexes, which allows userspace
    scripting of mutex unit-tests (and dynamic tests as well), using the actual
    rt-mutex implementation of the kernel.

    [akpm@osdl.org: fixlet]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Core functions for the rt-mutex subsystem.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar