All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: jt@hpl.hp.com
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Rusty Russell <rusty@rustcorp.com.au>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kthread: export park/unpark facility
Date: Wed, 08 Jul 2015 23:23:41 -0400	[thread overview]
Message-ID: <559DE93D.6030608@hurleysoftware.com> (raw)
In-Reply-To: <20150709004020.GA21087@hpl.hp.com>

On 07/08/2015 08:40 PM, Jean Tourrilhes wrote:
> 	Hi,
> 
> 	The kthread park/unpark facility is not used in the kernel

kernel/smpboot.c ?


> , so one would assume that it's made for kernel modules. This patch should
> definitely help most modules.
> 	Patch untested, at your own risks...
> 	Regards,
> 
> 	Jean
> 
> Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
> 
> diff -u -p linux-3.18.17/kernel/kthread.j2.c linux-3.18.17/kernel/kthread.c
> --- linux-3.18.17/kernel/kthread.j2.c	2015-07-08 17:01:39.010554169 -0700
> +++ linux-3.18.17/kernel/kthread.c	2015-07-08 17:09:13.016096189 -0700
> @@ -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 *
>  	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().


  reply	other threads:[~2015-07-09  3:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09  0:40 [PATCH] kthread: export park/unpark facility Jean Tourrilhes
2015-07-09  3:23 ` Peter Hurley [this message]
2015-07-09 16:08   ` Jean Tourrilhes
2015-07-09  8:05 ` Thomas Gleixner
2015-07-09 16:20   ` Jean Tourrilhes
2015-07-09 16:49     ` Thomas Gleixner
2015-07-09 16:53       ` Jean Tourrilhes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559DE93D.6030608@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.