[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150210145436.GB21643@treble.redhat.com>
Date: Tue, 10 Feb 2015 08:54:36 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Seth Jennings <sjenning@...hat.com>, Jiri Kosina <jkosina@...e.cz>,
Vojtech Pavlik <vojtech@...e.cz>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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.
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists