mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	DRI <dri-devel@lists.sourceforge.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep  (w. timeout) until wake_up
Date: Tue, 2 Mar 2010 21:32:37 +0100	[thread overview]
Message-ID: <b170af451003021232r7b4e961egbf572248d5784c26@mail.gmail.com> (raw)
In-Reply-To: <1267461438.5157.9586.camel@thor.local>

W dniu 1 marca 2010 17:37 użytkownik Michel Dänzer <michel@daenzer.net> napisał:
> On Sat, 2010-02-27 at 10:33 +0100, Rafał Miłecki wrote:
>> W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä <syrjala@sci.fi> napisał:
>> > Disabling the condition check doesn't make sense.
>> >
>> > You could use a completion.
>> >
>> > init_completion(vbl_irq);
>> > enable_vbl_irq();
>> > wait_for_completion(vbl_irq);
>> > disable_vbl_irq();
>> > and call complete(vbl_irq) in the interrupt handler.
>> >
>> > The same would of course work with just some flag or counter
>> > and a wait queue.
>>
>> Ouch, I can see it gone bad already.
>>
>> Firstly I simply just wanted to avoid condition in wait_event_*. It
>> looked unnecessary as I got interrupts (signals).
>
> So this code runs in user process context? If so, it should return to
> userspace ASAP on signal receipt, otherwise e.g. smoothness of X mouse
> movement may suffer.
>
> If that's a problem, then maybe the code should run in a different
> context, e.g. a tasklet or some kind of worker kernel thread.

It has nothing to do with userspace. Please see my previous description:



W dniu 26 lutego 2010 13:16 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> W dniu 26 lutego 2010 12:55 użytkownik Thomas Gleixner
>> Sleeping in the timer handler ? In which context runs this timer handler ?
>
> We have our struct delayed_work which we first init and then we use
> "queue_delayed_work" to start this "timer". So it's not real-real
> timer as struct timer_list.
>
> So this is actually delayed_work handler. Sorry (again) for my bad naming.



It's delayed_work.

-- 
Rafał

  reply	other threads:[~2010-03-02 20:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-21 14:10 Rafał Miłecki
2010-02-21 15:01 ` Thomas Hellstrom
2010-02-21 15:50   ` Rafał Miłecki
2010-02-24 22:33     ` Rafał Miłecki
2010-02-26 10:38 ` Rafał Miłecki
2010-02-26 11:55   ` Thomas Gleixner
2010-02-26 12:16     ` Rafał Miłecki
2010-02-26 16:14   ` Andrew Morton
2010-02-26 17:33     ` Rafał Miłecki
2010-02-26 19:01       ` Ville Syrjälä
2010-02-27  9:33         ` Rafał Miłecki
2010-03-01 16:37           ` Michel Dänzer
2010-03-02 20:32             ` Rafał Miłecki [this message]
2010-02-27  1:04   ` Linus Torvalds

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=b170af451003021232r7b4e961egbf572248d5784c26@mail.gmail.com \
    --to=zajec5@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@daenzer.net \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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®