[lkml]   [2015]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 5/9] sched: move task rq locking functions to sched.h
On Tue, Feb 10, 2015 at 07:48:17PM +0900, Masami Hiramatsu wrote:
> (2015/02/10 2:31), Josh Poimboeuf wrote:
> > Move task_rq_lock/unlock() to sched.h so they can be used elsewhere.
> > The livepatch code needs to lock each task's rq in order to safely
> > examine its stack and switch it to a new patch universe.
> Hmm, why don't you just expose (extern in sched.h) those?

One reason was because task_rq_unlock was already static inline, and I
didn't want to un-inline it. But that's probably a dumb reason, since I
inlined task_rq_lock and it wasn't inlined before.

But also, there are some other inlined locking functions in sched.h:
double_lock_balance, double_rq_lock, double_lock_irq, etc. So it just
seemed to "fit" better there.

Either way works for me. I'll ask some scheduler people.


 \ /
  Last update: 2015-02-10 16:01    [W:0.219 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site