mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: liu pf <kernelfans@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: Should we use preempt_disable() in sleep_on_common()?
Date: Thu, 3 Dec 2009 00:22:38 -0800	[thread overview]
Message-ID: <20091203082237.GM9121@core.coreip.homeip.net> (raw)
In-Reply-To: <563a732e0912030015u7dc1cac2x2a2ae226c7107b4e@mail.gmail.com>

On Thu, Dec 03, 2009 at 04:15:49PM +0800, liu pf wrote:
> On Thu, Dec 3, 2009 at 3:12 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Wed, Dec 02, 2009 at 11:07:46PM -0800, Arjan van de Ven wrote:
> >> On Thu, 3 Dec 2009 14:49:14 +0800
> >> liu pf <kernelfans@gmail.com> wrote:
> >>
> >> > Hi:
> >> >
> >> > I am puzzled with the following scenario. Could anyone enlighten me?
> >>
> >>
> >> sleep_on family of APIs is very racy and just cannot be used correctly;
> >> I'm not surprised that there's a preempt race in it, but trust me, it's
> >> not the biggest race... never ever use these APIs!!!
> >>
> >>
> >
> > BTW, why do we still have them? I checked couple and they don't seem to
> > be used...
> >
> > --
> > Dmitry
> >
> 
> Hi, what is the substitution for  sleep_on family of APIs? Any sample code?
> 

wait_event() and friends. Just look up any non-ancient driver.

-- 
Dmitry

  reply	other threads:[~2009-12-03  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03  6:49 liu pf
2009-12-03  7:07 ` Arjan van de Ven
2009-12-03  7:12   ` Dmitry Torokhov
2009-12-03  7:15     ` Dmitry Torokhov
2009-12-03  8:15     ` liu pf
2009-12-03  8:22       ` Dmitry Torokhov [this message]
2009-12-03  8:53         ` liu pf
2009-12-03  7:57 ` Dmitry Adamushko
2009-12-03  8:01   ` liu pf

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=20091203082237.GM9121@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=arjan@infradead.org \
    --cc=kernelfans@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®