Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Jiri Slaby
Alan Cox napsal(a):
> I think just using tty_wakeup for this ought to be sufficient unless they
> are using the work queue for some kind of serialization of events

Actually this is what I wanted to hear. Going to change those which does it.

thanks,
--js
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Alan Cox
On Thu,  1 Nov 2007 11:55:56 +0100 (CET)
Jiri Slaby <[EMAIL PROTECTED]> wrote:

> tty, add tty_schedule_wakeup
> 
> Because several drivers schedule a workqueue only for tty_wakeup, move this
> functionality into tty layer and use newly added centralized work.

I've no idea why any drivers do this. A tty_wakeup is very fast and it
won't (when called from an IRQ) reschedule anything until the IRQ is over
(in the RT kernel case it might do stuff but thats *because* it should do
so).

I think just using tty_wakeup for this ought to be sufficient unless they
are using the work queue for some kind of serialization of events
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Paul Fulghum

Jiri Slaby wrote:

+ * Functionally the same as tty_wakeup, but it can be used in hot
+ * paths. since the wakeup is scheduled and done in the future.



I'm not familiar with the terminology 'hot paths',
what do you mean by that?

Do you have an example of where you intend to
use this new facility? The patch does not include
such an example so it is difficult for me to see
why you are adding this function.

--
Paul Fulghum
Microgate Systems, Ltd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Jiri Slaby
Paul Fulghum napsal(a):
> Jiri Slaby wrote:
>> + *Functionally the same as tty_wakeup, but it can be used in hot
>> + *paths. since the wakeup is scheduled and done in the future.
>>
> 
> I'm not familiar with the terminology 'hot paths',
> what do you mean by that?

Ah, thank you for the feedback, I should change this, since it seems to be
not so much descriptive.

Functionally the same as tty_wakeup, but it can be used in code, which is
expected to be fast and short (e.g. interrupt handler), since the wakeup is
scheduled and done in the future.

> Do you have an example of where you intend to
> use this new facility? The patch does not include
> such an example so it is difficult for me to see
> why you are adding this function.

I want to use it in all char drivers, which schedules a work only for
tty_wakeup() calling, because they don't want to include more code in
interrupt handlers for example (if I understand the code correctly, e.g.
n_tty discipline may invoke whole fasync machinery on tty_wakeup call).

If somebody thinks it's not needed (or it's overkill), the other approach
comes -- change all wakeup schedules with simple tty_wakeup().

thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Jiri Slaby
Paul Fulghum napsal(a):
 Jiri Slaby wrote:
 + *Functionally the same as tty_wakeup, but it can be used in hot
 + *paths. since the wakeup is scheduled and done in the future.

 
 I'm not familiar with the terminology 'hot paths',
 what do you mean by that?

Ah, thank you for the feedback, I should change this, since it seems to be
not so much descriptive.

Functionally the same as tty_wakeup, but it can be used in code, which is
expected to be fast and short (e.g. interrupt handler), since the wakeup is
scheduled and done in the future.

 Do you have an example of where you intend to
 use this new facility? The patch does not include
 such an example so it is difficult for me to see
 why you are adding this function.

I want to use it in all char drivers, which schedules a work only for
tty_wakeup() calling, because they don't want to include more code in
interrupt handlers for example (if I understand the code correctly, e.g.
n_tty discipline may invoke whole fasync machinery on tty_wakeup call).

If somebody thinks it's not needed (or it's overkill), the other approach
comes -- change all wakeup schedules with simple tty_wakeup().

thanks.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Paul Fulghum

Jiri Slaby wrote:

+ * Functionally the same as tty_wakeup, but it can be used in hot
+ * paths. since the wakeup is scheduled and done in the future.



I'm not familiar with the terminology 'hot paths',
what do you mean by that?

Do you have an example of where you intend to
use this new facility? The patch does not include
such an example so it is difficult for me to see
why you are adding this function.

--
Paul Fulghum
Microgate Systems, Ltd
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Alan Cox
On Thu,  1 Nov 2007 11:55:56 +0100 (CET)
Jiri Slaby [EMAIL PROTECTED] wrote:

 tty, add tty_schedule_wakeup
 
 Because several drivers schedule a workqueue only for tty_wakeup, move this
 functionality into tty layer and use newly added centralized work.

I've no idea why any drivers do this. A tty_wakeup is very fast and it
won't (when called from an IRQ) reschedule anything until the IRQ is over
(in the RT kernel case it might do stuff but thats *because* it should do
so).

I think just using tty_wakeup for this ought to be sufficient unless they
are using the work queue for some kind of serialization of events
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] Char: tty, add tty_schedule_wakeup

2007-11-01 Thread Jiri Slaby
Alan Cox napsal(a):
 I think just using tty_wakeup for this ought to be sufficient unless they
 are using the work queue for some kind of serialization of events

Actually this is what I wanted to hear. Going to change those which does it.

thanks,
--js
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/