Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754867AbbG0QBd (ORCPT ); Mon, 27 Jul 2015 12:01:33 -0400 Received: from mail1.bemta12.messagelabs.com ([216.82.251.14]:59254 "EHLO mail1.bemta12.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754530AbbG0QBb convert rfc822-to-8bit (ORCPT ); Mon, 27 Jul 2015 12:01:31 -0400 X-Env-Sender: David.Kershner@unisys.com X-Msg-Ref: server-2.tower-28.messagelabs.com!1438012885!16908128!9 X-Originating-IP: [192.61.61.105] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=-,-,- X-VirusChecked: Checked From: "Kershner, David A" To: Neil Horman , Ingo Molnar CC: "akpm@linux-foundation.org" , "tj@kernel.org" , "laijs@cn.fujitsu.com" , "nacc@linux.vnet.ibm.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "jes.sorensen@redhat.com" , *S-Par-Maintainer Subject: RE: [PATCH] kthread: Export kthread functions Thread-Topic: [PATCH] kthread: Export kthread functions Thread-Index: AQHQxmJ4ghdWVEb8dk+4gAIK6Itam53vzawAgAAA5QD//69pcA== Date: Mon, 27 Jul 2015 16:01:09 +0000 Message-ID: <71def1255d4044ef871bb6915b7c81b3@US-EXCH13-1.na.uis.unisys.com> References: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> <20150727154549.GA18807@gmail.com> <20150727154902.GG6497@hmsreliant.think-freely.org> In-Reply-To: <20150727154902.GG6497@hmsreliant.think-freely.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.17.124.25] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3135 Lines: 97 > -----Original Message----- > From: Neil Horman [mailto:nhorman@redhat.com] > Sent: Monday, July 27, 2015 11:49 AM > To: Ingo Molnar > Cc: Kershner, David A; akpm@linux-foundation.org; tj@kernel.org; > laijs@cn.fujitsu.com; nacc@linux.vnet.ibm.com; tglx@linutronix.de; > mingo@redhat.com; linux-kernel@vger.kernel.org; > jes.sorensen@redhat.com; *S-Par-Maintainer > Subject: Re: [PATCH] kthread: Export kthread functions > > On Mon, Jul 27, 2015 at 05:45:50PM +0200, Ingo Molnar wrote: > > > > * David Kershner wrote: > > > > > The s-Par visornic driver, currently in staging, processes a queue > > > being serviced by the an s-Par service partition. We can get a message > > > that something has happened with the Service Partition, when that > > > happens, we must not access the channel until we get a message that the > > > service partition is back again. > > > > > > The visornic driver has a thread for processing the channel, when we > > > get the message, we need to be able to park the thread and then resume > > > it when the problem clears. > > > > > > We can do this with kthread_park and unpark but they are not exported > > > from the kernel, this patch exports the needed functions. > > > > > > Signed-off-by: David Kershner > > > --- > > > kernel/kthread.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/kernel/kthread.c b/kernel/kthread.c > > > index 10e489c..bad80c1 100644 > > > --- a/kernel/kthread.c > > > +++ b/kernel/kthread.c > > > @@ -97,6 +97,7 @@ bool kthread_should_park(void) > > > { > > > return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(current)- > >flags); > > > } > > > +EXPORT_SYMBOL(kthread_should_park); > > > > > > /** > > > * kthread_freezable_should_stop - should this freezable kthread return > now? > > > @@ -171,6 +172,7 @@ void kthread_parkme(void) > > > { > > > __kthread_parkme(to_kthread(current)); > > > } > > > +EXPORT_SYMBOL(kthread_parkme); > > > > > > static int kthread(void *_create) > > > { > > > @@ -411,6 +413,7 @@ void kthread_unpark(struct task_struct *k) > > > if (kthread) > > > __kthread_unpark(k, kthread); > > > } > > > +EXPORT_SYMBOL(kthread_unpark); > > > > > > /** > > > * kthread_park - park a thread created by kthread_create(). > > > @@ -441,6 +444,7 @@ int kthread_park(struct task_struct *k) > > > } > > > return ret; > > > } > > > +EXPORT_SYMBOL(kthread_park); > > > > > > /** > > > * kthread_stop - stop a thread created by kthread_create(). > > > > Please make these EXPORT_SYMBOL_GPL(), as > kthread_freezable_should_stop() is > > already _GPL(), and generally new kthread APIs are exported via > > EXPORT_SYMBOL_GPL(). > > > Im ok with that. David? > Neil > Fine with that as well. David > > With that change: > > > > Acked-by: Ingo Molnar > > > > Thanks, > > > > Ingo -- 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/