lkml.org 
[lkml]   [2005]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Fixes for RCU handling of task_struct
    Ingo Molnar <mingo@elte.hu> wrote:
    >
    > ...
    >
    > RCU signal handling: send signals RCU-read-locked instead of
    > tasklist_lock read-locked. This is a scalability improvement on SMP and
    > a preemption-latency improvement under PREEMPT_RCU.
    >
    > Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com>
    > Signed-off-by: Ingo Molnar <mingo@elte.hu>
    >
    > ...
    > +static inline int get_task_struct_rcu(struct task_struct *t)
    > +{
    > + int oldusage;
    > +
    > + do {
    > + oldusage = atomic_read(&t->usage);
    > + if (oldusage == 0) {
    > + return 0;
    > + }
    > + } while (cmpxchg(&t->usage.counter,
    > + oldusage, oldusage + 1) != oldusage);
    > + return 1;
    > +}

    arm (at least) does not implement cmpxchg.

    I think Nick is working on patches which implement cmpxchg on all
    architectures?
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-11-06 22:54    [W:0.021 / U:29.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site