Re: kthread with kpause or callout

2010-02-22 Thread Andrew Doran
On Mon, Feb 08, 2010 at 03:04:07PM +0100, Frank Wille wrote: On Mon, 8 Feb 2010 11:29:51 +0100 Martin Husemann mar...@duskware.de wrote: On Mon, Feb 08, 2010 at 11:11:04AM +0100, Frank Wille wrote: - Running a kthread and calling kpause() between the polls. - Using a callout which

Re: kthread with kpause or callout

2010-02-08 Thread Martin Husemann
On Mon, Feb 08, 2010 at 11:11:04AM +0100, Frank Wille wrote: - Running a kthread and calling kpause() between the polls. - Using a callout which reschedules itself after the poll. The thread is quite a bit more heavyweight, but you have full freedom to do what you want. The callout is pretty

Re: kthread with kpause or callout

2010-02-08 Thread Frank Wille
On Mon, 8 Feb 2010 11:29:51 +0100 Martin Husemann mar...@duskware.de wrote: On Mon, Feb 08, 2010 at 11:11:04AM +0100, Frank Wille wrote: - Running a kthread and calling kpause() between the polls. - Using a callout which reschedules itself after the poll. The thread is quite a bit more

Re: kthread with kpause or callout

2010-02-08 Thread Frank Wille
On Mon, 8 Feb 2010 15:09:55 +0100 Martin Husemann mar...@duskware.de wrote: On Mon, Feb 08, 2010 at 03:04:07PM +0100, Frank Wille wrote: [...] May I acquire this mutex during a callout (which is a softint, as I understand)? Will the softint sleep or busy-wait? Depends on the mutex type,

Re: kthread with kpause or callout

2010-02-08 Thread Frank Wille
On Mon, 8 Feb 2010 15:12:10 +0100 Martin Husemann mar...@duskware.de wrote: On Mon, Feb 08, 2010 at 03:09:55PM +0100, Martin Husemann wrote: The wording is not explicit, but a softint is not allowed to block on s/softint/callout/ of course, sorry for the confusion. *Now* you confused me!

Re: kthread with kpause or callout

2010-02-08 Thread Martin Husemann
On Mon, Feb 08, 2010 at 03:35:35PM +0100, Frank Wille wrote: IMHO that would allow my callout to sleep on acquiring the mutex? A softint can sleep, a callout can not. Martin

Re: kthread with kpause or callout

2010-02-08 Thread Joerg Sonnenberger
On Mon, Feb 08, 2010 at 03:36:07PM +0100, Martin Husemann wrote: On Mon, Feb 08, 2010 at 03:35:35PM +0100, Frank Wille wrote: IMHO that would allow my callout to sleep on acquiring the mutex? A softint can sleep, a callout can not. s/can/should/ Joerg