[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160614135245.65448383@grimm.local.home>
Date: Tue, 14 Jun 2016 13:52:45 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Clark Williams <williams@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Piggin <nickpiggin@...oo.com.au>
Subject: Re: [PATCH] sched: Do not release current rq lock on non contended
double_lock_balance()
>
> > CPU 0 CPU 1
> > ----- -----
> > [ wake up ]
> > spin_lock(cpu1_rq->lock);
> > spin_lock(cpu1_rq->lock)
> > double_lock_balance()
> > [ release cpu1_rq->lock ]
> > spin_lock(cpu1_rq->lock)
> > [due to ticket, now acquires
> > cpu1_rq->lock ]
> >
> > [goes to push task]
> > double_lock_balance()
> > [ release cpu1_rq->lock ]
> > [ acquires lock ]
> > spin_lock(cpu2_rq->lock)
> > [ blocks as cpu2 is using it ]
> >
>
> Also, its not entirely clear this scenario helps illustrate how your
> change is better; because here the lock _is_ contended, so we'll fail
> the trylock, no?
Sorry, I should have been more specific that the double lock balance
was grabbing cpu2_rq (another rq lock), where there was no contention.
-- Steve
Powered by blists - more mailing lists