Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752932AbbBJOyn (ORCPT ); Tue, 10 Feb 2015 09:54:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47273 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbbBJOym (ORCPT ); Tue, 10 Feb 2015 09:54:42 -0500 Date: Tue, 10 Feb 2015 08:54:36 -0600 From: Josh Poimboeuf To: Masami Hiramatsu Cc: Seth Jennings , Jiri Kosina , Vojtech Pavlik , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 5/9] sched: move task rq locking functions to sched.h Message-ID: <20150210145436.GB21643@treble.redhat.com> References: <3f90fabd487411e694209447cf097fb0fbcce412.1423499826.git.jpoimboe@redhat.com> <54D9E1F1.5040604@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <54D9E1F1.5040604@hitachi.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1058 Lines: 25 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/