lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] softlockup: convert read_lock in hung_task to rcu_read_lock
    Ingo Molnar (mingo@elte.hu) wrote:
    >
    > I've applied your patch to tip:core/softlockup, thanks Mandeep!
    >

    Oops, I put the conversion to rcu_read_lock in a seperate patch. I
    understand now the convention is to use a patch series only when the
    patches can be applied independently.

    ---
    Since the tasklist is protected by rcu list operations, it is safe
    to convert the read_lock()s to rcu_read_lock().

    Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Mandeep Singh Baines <msb@google.com>
    ---
    kernel/hung_task.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/kernel/hung_task.c b/kernel/hung_task.c
    index d32d293..34b678c 100644
    --- a/kernel/hung_task.c
    +++ b/kernel/hung_task.c
    @@ -155,7 +155,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
    if (test_taint(TAINT_DIE) || did_panic)
    return;

    - read_lock(&tasklist_lock);
    + rcu_read_lock();
    do_each_thread(g, t) {
    if (!--max_count)
    goto unlock;
    @@ -171,7 +171,7 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout)
    check_hung_task(t, now, timeout);
    } while_each_thread(g, t);
    unlock:
    - read_unlock(&tasklist_lock);
    + rcu_read_unlock();
    }

    static void update_poll_jiffies(void)
    --
    1.5.4.5


    \
     
     \ /
      Last update: 2009-02-05 18:59    [W:0.035 / U:28.792 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site