mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sage Weil <sage@newdream.net>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	andreas.herrmann3@amd.com, tglx@linutronix.de, efault@gmx.de,
	akpm@linux-foundation.org
Subject: Re: [PATCH] sched: add wait_for_completion_killable_timeout
Date: Sat, 29 May 2010 12:44:47 +0200	[thread overview]
Message-ID: <1275129887.27810.13216.camel@twins> (raw)
In-Reply-To: <Pine.LNX.4.64.1005281214390.2828@cobra.newdream.net>

On Fri, 2010-05-28 at 12:16 -0700, Sage Weil wrote:
> Hi-
> 
> Do I need an ACK on this, or should I just send this to Linus with the 
> Ceph fix?  It's a pretty trivial fixup.

> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -4161,6 +4161,23 @@ int __sched wait_for_completion_killable(struct completion *x)
> >  EXPORT_SYMBOL(wait_for_completion_killable);
> >  
> >  /**
> > + * wait_for_completion_killable_timeout: - waits for completion of a task (w/(to,killable))
> > + * @x:  holds the state of this particular completion
> > + * @timeout:  timeout value in jiffies
> > + *
> > + * This waits for either a completion of a specific task to be
> > + * signaled or for a specified timeout to expire. It can be
> > + * interrupted by a kill signal. The timeout is in jiffies.
> > + */
> > +unsigned long __sched
> > +wait_for_completion_killable_timeout(struct completion *x,
> > +				     unsigned long timeout)
> > +{
> > +	return wait_for_common(x, timeout, TASK_KILLABLE);
> > +}
> > +EXPORT_SYMBOL(wait_for_completion_killable_timeout);
> > +
> > +/**
> >   *	try_wait_for_completion - try to decrement a completion without blocking
> >   *	@x:	completion structure
> >   *

I guess its ok, although I have an intrinsic suspicion of all things
timeout, but since we have plenty of those interfaces around I can't
object too much ;-)

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

  reply	other threads:[~2010-05-29 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 18:35 Sage Weil
2010-05-28 19:16 ` Sage Weil
2010-05-29 10:44   ` Peter Zijlstra [this message]
2010-05-29 16:15     ` Sage Weil

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=1275129887.27810.13216.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sage@newdream.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®