[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b170af451003021232r7b4e961egbf572248d5784c26@mail.gmail.com>
Date: Tue, 2 Mar 2010 21:32:37 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: Michel Dänzer <michel@...nzer.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
DRI <dri-devel@...ts.sourceforge.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep
(w. timeout) until wake_up
W dniu 1 marca 2010 17:37 użytkownik Michel Dänzer <michel@...nzer.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@....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@...il.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ł
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists