lkml.org 
[lkml]   [2010]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 5/5] sched: Reduce ttwu rq->lock contention
    On 12/16, Peter Zijlstra wrote:
    >
    > Then instead of locking the remote rq and activating the task, place
    > the task on a remote queue, again using cmpxchg, and notify the remote
    > cpu per IPI if this queue was empty to start processing its wakeups.

    Interesting... I didn't actually read this patch yet, just a very
    minor nit.

    > +#ifdef CONFIG_SMP
    > +static void ttwu_queue_remote(struct task_struct *p, int cpu)
    > +{
    > + struct task_struct *next = NULL;
    > + struct rq *rq = cpu_rq(cpu);
    > +
    > + for (;;) {
    > + struct task_struct *old = next;
    > +
    > + p->wake_entry = next;
    > + next = cmpxchg(&rq->wake_list, old, p);

    Somehow I was confused by initial "next = NULL", perhaps

    struct rq *rq = cpu_rq(cpu);
    struct task_struct *next = rq->wake_list;

    makes a bit more sense.

    Oleg.



    \
     
     \ /
      Last update: 2010-12-16 19:11    [W:0.028 / U:154.788 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site