* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 7:47 ` Elias Oltmanns
@ 2008-07-01 8:02 ` Elias Oltmanns
2008-07-01 8:28 ` Török Edwin
2008-07-01 8:50 ` David Newall
` (3 subsequent siblings)
4 siblings, 1 reply; 47+ messages in thread
From: Elias Oltmanns @ 2008-07-01 8:02 UTC (permalink / raw)
To: Török Edwin; +Cc: Alan Cox, Joe Peterson, Linux Kernel
Elias Oltmanns <eo@nebensachen.de> wrote:
[...]
> The following patch to 2.6.26-rc8 fixes the issue for me.
Sorry, resending without MIME encoding the message.
Regards,
Elias
--------
From: Elias Oltmanns <eo@nebensachen.de>
Subject: Make sure that interrupt characters get through reliably
Since commit ec5b1157f8e819c72fc93aa6d2d5117c08cdc961, users have been
unable to interrupt interactive processes reliably by pressing CTRL+C.
This patch reverts the original commit except for the most important
part: actually echoing ^C is preserved.
Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
---
drivers/char/n_tty.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 8096389..74018ef 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -759,20 +759,9 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
signal = SIGTSTP;
if (c == SUSP_CHAR(tty)) {
send_signal:
- /*
- * Echo character, and then send the signal.
- * Note that we do not use isig() here because we want
- * the order to be:
- * 1) flush, 2) echo, 3) signal
- */
- if (!L_NOFLSH(tty)) {
- n_tty_flush_buffer(tty);
- tty_driver_flush_buffer(tty);
- }
if (L_ECHO(tty))
echo_char(c, tty);
- if (tty->pgrp)
- kill_pgrp(tty->pgrp, signal, 1);
+ isig(signal, tty, 0);
return;
}
}
^ permalink raw reply related [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 8:02 ` Elias Oltmanns
@ 2008-07-01 8:28 ` Török Edwin
2008-07-01 9:59 ` Elias Oltmanns
2008-07-01 12:07 ` Joe Peterson
0 siblings, 2 replies; 47+ messages in thread
From: Török Edwin @ 2008-07-01 8:28 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Alan Cox, Joe Peterson, Linux Kernel
Elias Oltmanns wrote:
> Elias Oltmanns <eo@nebensachen.de> wrote:
> [...]
>
>> The following patch to 2.6.26-rc8 fixes the issue for me.
>>
>
> Sorry, resending without MIME encoding the message.
>
> Regards,
>
> Elias
>
>
> --------
> From: Elias Oltmanns <eo@nebensachen.de>
> Subject: Make sure that interrupt characters get through reliably
>
> Since commit ec5b1157f8e819c72fc93aa6d2d5117c08cdc961, users have been
> unable to interrupt interactive processes reliably by pressing CTRL+C.
> This patch reverts the original commit except for the most important
> part: actually echoing ^C is preserved.
>
Thanks for the patch , the process seems to respond faster to Ctrl-C,
but I'll have to find a way to measure that reliably.
However ^C is not echoed anymore for me.
Best regards,
--Edwin
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 8:28 ` Török Edwin
@ 2008-07-01 9:59 ` Elias Oltmanns
2008-07-01 12:07 ` Joe Peterson
1 sibling, 0 replies; 47+ messages in thread
From: Elias Oltmanns @ 2008-07-01 9:59 UTC (permalink / raw)
To: Török Edwin; +Cc: Alan Cox, Joe Peterson, Linux Kernel
Török Edwin <edwintorok@gmail.com> wrote:
> Elias Oltmanns wrote:
[...]
>> Since commit ec5b1157f8e819c72fc93aa6d2d5117c08cdc961, users have been
>> unable to interrupt interactive processes reliably by pressing CTRL+C.
>> This patch reverts the original commit except for the most important
>> part: actually echoing ^C is preserved.
>>
>
> Thanks for the patch , the process seems to respond faster to Ctrl-C,
> but I'll have to find a way to measure that reliably.
> However ^C is not echoed anymore for me.
Very odd, it most definitely is echoed here. Are you quite sure you
haven't inadvertently changed anything else in the meantime?
Regards,
Elias
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 8:28 ` Török Edwin
2008-07-01 9:59 ` Elias Oltmanns
@ 2008-07-01 12:07 ` Joe Peterson
1 sibling, 0 replies; 47+ messages in thread
From: Joe Peterson @ 2008-07-01 12:07 UTC (permalink / raw)
To: Török Edwin; +Cc: Elias Oltmanns, Alan Cox, Linux Kernel
Török Edwin wrote:
> Thanks for the patch , the process seems to respond faster to Ctrl-C,
> but I'll have to find a way to measure that reliably.
> However ^C is not echoed anymore for me.
I found the same thing when I originally did the ^C echo patch. If isig() was
used instead of the order specified (flush, echo, signal), the ^C did not echo
reliably (i.e., it echoed on a tty console, but not in an xterm). isig() does
the kill, then the flush.
Note that ^Z uses the same logic, so the fact that you are seeing this take
effect more quickly is interesting.
I will try a few things today, but please experiment with various orderings of
the calls and let me know what you find (and test the ^C echo in both tty
console and xterm).
-Joe
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 7:47 ` Elias Oltmanns
2008-07-01 8:02 ` Elias Oltmanns
@ 2008-07-01 8:50 ` David Newall
2008-07-01 9:01 ` Török Edwin
2008-07-01 14:12 ` Joe Peterson
` (2 subsequent siblings)
4 siblings, 1 reply; 47+ messages in thread
From: David Newall @ 2008-07-01 8:50 UTC (permalink / raw)
To: Elias Oltmanns
Cc: Török Edwin, Alan Cox, Joe Peterson, Linux Kernel
Elias Oltmanns wrote:
> - if (!L_NOFLSH(tty)) {
> - n_tty_flush_buffer(tty);
> - tty_driver_flush_buffer(tty);
> - }
> if (L_ECHO(tty))
> echo_char(c, tty);
> - if (tty->pgrp)
> - kill_pgrp(tty->pgrp, signal, 1);
> + isig(signal, tty, 0);
My first reaction is that tty->pgrp must be null. Perhaps the patch
could be simplified...
if (tty->pgrp)
kill_pgrp(tty->pgrp, signal, 1);
+ else
+ isig(signal, tty, 0);
Thoughts?
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 8:50 ` David Newall
@ 2008-07-01 9:01 ` Török Edwin
2008-07-01 9:12 ` David Newall
0 siblings, 1 reply; 47+ messages in thread
From: Török Edwin @ 2008-07-01 9:01 UTC (permalink / raw)
To: David Newall; +Cc: Elias Oltmanns, Alan Cox, Joe Peterson, Linux Kernel
David Newall wrote:
> Elias Oltmanns wrote:
>
>> - if (!L_NOFLSH(tty)) {
>> - n_tty_flush_buffer(tty);
>> - tty_driver_flush_buffer(tty);
>> - }
>> if (L_ECHO(tty))
>> echo_char(c, tty);
>> - if (tty->pgrp)
>> - kill_pgrp(tty->pgrp, signal, 1);
>> + isig(signal, tty, 0);
>>
>
> My first reaction is that tty->pgrp must be null. Perhaps the patch
> could be simplified...
>
> if (tty->pgrp)
> kill_pgrp(tty->pgrp, signal, 1);
> + else
> + isig(signal, tty, 0);
>
>
> Thoughts?
>
isig has the same check, if it is NULL, isig won't deliver the signal
either:
if (tty->pgrp)
kill_pgrp(tty->pgrp, sig, 1);
--Edwin
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 9:01 ` Török Edwin
@ 2008-07-01 9:12 ` David Newall
0 siblings, 0 replies; 47+ messages in thread
From: David Newall @ 2008-07-01 9:12 UTC (permalink / raw)
To: Török Edwin
Cc: Elias Oltmanns, Alan Cox, Joe Peterson, Linux Kernel
Török Edwin wrote:
> David Newall wrote:
>
>> Elias Oltmanns wrote:
>>
>>
>>> - if (!L_NOFLSH(tty)) {
>>> - n_tty_flush_buffer(tty);
>>> - tty_driver_flush_buffer(tty);
>>> - }
>>> if (L_ECHO(tty))
>>> echo_char(c, tty);
>>> - if (tty->pgrp)
>>> - kill_pgrp(tty->pgrp, signal, 1);
>>> + isig(signal, tty, 0);
>>>
>>>
>> My first reaction is that tty->pgrp must be null. Perhaps the patch
>> could be simplified...
>>
>> if (tty->pgrp)
>> kill_pgrp(tty->pgrp, signal, 1);
>> + else
>> + isig(signal, tty, 0);
>>
>>
>> Thoughts?
>>
>>
>
> isig has the same check, if it is NULL, isig won't deliver the signal
> either
>
That is odd. We did see the control-key echoed, so, other than not
flushing output, what's funcitonally different?
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 7:47 ` Elias Oltmanns
2008-07-01 8:02 ` Elias Oltmanns
2008-07-01 8:50 ` David Newall
@ 2008-07-01 14:12 ` Joe Peterson
2008-07-01 14:48 ` Elias Oltmanns
2008-07-02 21:26 ` Joe Peterson
2008-07-04 20:10 ` Joe Peterson
4 siblings, 1 reply; 47+ messages in thread
From: Joe Peterson @ 2008-07-01 14:12 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Török Edwin, Alan Cox, Linux Kernel
Elias Oltmanns wrote:
> The following patch to 2.6.26-rc8 fixes the issue for me. Perhaps we
> really want to do something else, but since I'm not all that familiar
> with the standard behaviour on other Unices and since the comment
> describing the changed order of function calls in the original commit
> didn't give the reason for that change, I leave that to more
> knowledgeable people.
>
> drivers/char/n_tty.c | 13 +------------
> 1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
> index 8096389..74018ef 100644
> --- a/drivers/char/n_tty.c
> +++ b/drivers/char/n_tty.c
> @@ -759,20 +759,9 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
> signal = SIGTSTP;
> if (c == SUSP_CHAR(tty)) {
> send_signal:
> - /*
> - * Echo character, and then send the signal.
> - * Note that we do not use isig() here because we want
> - * the order to be:
> - * 1) flush, 2) echo, 3) signal
> - */
> - if (!L_NOFLSH(tty)) {
> - n_tty_flush_buffer(tty);
> - tty_driver_flush_buffer(tty);
> - }
> if (L_ECHO(tty))
> echo_char(c, tty);
> - if (tty->pgrp)
> - kill_pgrp(tty->pgrp, signal, 1);
> + isig(signal, tty, 0);
> return;
> }
> }
I noticed the original post in this thread mentioned that the problem
has been seen since 2.6.21 or 2.6.23:
> I use 2.6.25-2 and 2.6.26-rc8 now; I don't recall seeing this
> behaviour with old kernels (IIRC I see this since 2.6.21 or 2.6.23).
>
> Is this intended behaviour, or should I report a bug?
The echo patch that is altered in the patch above only appeared recently
(in 2.6.25). Is there a way for you try try the test case on a
pre-2.6.25 kernel and see if the issue exists there? If so, it is
strange that the above fixes it.
-Joe
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 14:12 ` Joe Peterson
@ 2008-07-01 14:48 ` Elias Oltmanns
2008-07-01 16:27 ` Joe Peterson
0 siblings, 1 reply; 47+ messages in thread
From: Elias Oltmanns @ 2008-07-01 14:48 UTC (permalink / raw)
To: Joe Peterson; +Cc: Török Edwin, Alan Cox, Linux Kernel
Joe Peterson <joe@skyrush.com> wrote:
> Elias Oltmanns wrote:
>> The following patch to 2.6.26-rc8 fixes the issue for me. Perhaps we
>> really want to do something else, but since I'm not all that familiar
>> with the standard behaviour on other Unices and since the comment
>> describing the changed order of function calls in the original commit
>> didn't give the reason for that change, I leave that to more
>> knowledgeable people.
>>
>> drivers/char/n_tty.c | 13 +------------
>> 1 files changed, 1 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
>> index 8096389..74018ef 100644
>> --- a/drivers/char/n_tty.c
>> +++ b/drivers/char/n_tty.c
>> @@ -759,20 +759,9 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
>> signal = SIGTSTP;
>> if (c == SUSP_CHAR(tty)) {
>> send_signal:
>> - /*
>> - * Echo character, and then send the signal.
>> - * Note that we do not use isig() here because we want
>> - * the order to be:
>> - * 1) flush, 2) echo, 3) signal
>> - */
>> - if (!L_NOFLSH(tty)) {
>> - n_tty_flush_buffer(tty);
>> - tty_driver_flush_buffer(tty);
>> - }
>> if (L_ECHO(tty))
>> echo_char(c, tty);
>> - if (tty->pgrp)
>> - kill_pgrp(tty->pgrp, signal, 1);
>> + isig(signal, tty, 0);
>> return;
>> }
>> }
>
> I noticed the original post in this thread mentioned that the problem
> has been seen since 2.6.21 or 2.6.23:
>
>> I use 2.6.25-2 and 2.6.26-rc8 now; I don't recall seeing this
>> behaviour with old kernels (IIRC I see this since 2.6.21 or 2.6.23).
>>
>> Is this intended behaviour, or should I report a bug?
>
> The echo patch that is altered in the patch above only appeared recently
> (in 2.6.25). Is there a way for you try try the test case on a
> pre-2.6.25 kernel and see if the issue exists there? If so, it is
> strange that the above fixes it.
Due to my tests, 2.6.24 responds much faster to Ctrl+C than 2.6.25 does.
The patch above makes them *feel* alike again (no hard numbers, mind).
However, I haven't checked anything as early as 2.6.21 or before so I
don't know whether there may have been another regression since then.
Regards,
Elias
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 14:48 ` Elias Oltmanns
@ 2008-07-01 16:27 ` Joe Peterson
0 siblings, 0 replies; 47+ messages in thread
From: Joe Peterson @ 2008-07-01 16:27 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Török Edwin, Alan Cox, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Elias Oltmanns wrote:
> Due to my tests, 2.6.24 responds much faster to Ctrl+C than 2.6.25 does.
> The patch above makes them *feel* alike again (no hard numbers, mind).
> However, I haven't checked anything as early as 2.6.21 or before so I
> don't know whether there may have been another regression since then.
OK, thanks for checking. Can you try the patch below? It is almost the
same as your patch, except it reverses the order of the isig and the echo.
This causes ^C echo to work for me in both console and xterm. Back when
I did the original patch, I was concerned this ordering could result in
the ^C echoing late, but this may not be an issue.
Let me know if the patch below fixes the issue with interrupting
processes waiting for I/O.
Thanks, Joe
[-- Attachment #2: ctrl_c.patch --]
[-- Type: text/x-patch, Size: 654 bytes --]
--- linux/drivers/char/n_tty.c.orig 2008-07-01 10:48:05.000000000 -0500
+++ linux/drivers/char/n_tty.c 2008-07-01 11:20:07.000000000 -0500
@@ -759,20 +759,9 @@
signal = SIGTSTP;
if (c == SUSP_CHAR(tty)) {
send_signal:
- /*
- * Echo character, and then send the signal.
- * Note that we do not use isig() here because we want
- * the order to be:
- * 1) flush, 2) echo, 3) signal
- */
- if (!L_NOFLSH(tty)) {
- n_tty_flush_buffer(tty);
- tty_driver_flush_buffer(tty);
- }
+ isig(signal, tty, 0);
if (L_ECHO(tty))
echo_char(c, tty);
- if (tty->pgrp)
- kill_pgrp(tty->pgrp, signal, 1);
return;
}
}
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 7:47 ` Elias Oltmanns
` (2 preceding siblings ...)
2008-07-01 14:12 ` Joe Peterson
@ 2008-07-02 21:26 ` Joe Peterson
2008-07-04 20:10 ` Joe Peterson
4 siblings, 0 replies; 47+ messages in thread
From: Joe Peterson @ 2008-07-02 21:26 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Török Edwin, Alan Cox, Linux Kernel
Elias Oltmanns wrote:
> - /*
> - * Echo character, and then send the signal.
> - * Note that we do not use isig() here because we want
> - * the order to be:
> - * 1) flush, 2) echo, 3) signal
> - */
> - if (!L_NOFLSH(tty)) {
> - n_tty_flush_buffer(tty);
> - tty_driver_flush_buffer(tty);
> - }
> if (L_ECHO(tty))
> echo_char(c, tty);
> - if (tty->pgrp)
> - kill_pgrp(tty->pgrp, signal, 1);
> + isig(signal, tty, 0);
> return;
I've been doing some experimenting with the order of the three
operations (flush, echo, and signal), and the behavior is slightly
different with each.
The way I have it in the code now matches the order used by FreeBSD, so
there may actually be a good reason to flush the tty buffers *before*
issuing the signal. Here is their snippet of code:
if (ISSET(lflag, ISIG)) {
if (CCEQ(cc[VINTR], c) || CCEQ(cc[VQUIT], c)) {
if (!ISSET(lflag, NOFLSH))
ttyflush(tp, FREAD | FWRITE);
ttyecho(c, tp);
if (tp->t_pgrp != NULL) {
PGRP_LOCK(tp->t_pgrp);
pgsignal(tp->t_pgrp,
CCEQ(cc[VINTR], c) ? SIGINT : SIGQUIT, 1);
PGRP_UNLOCK(tp->t_pgrp);
}
goto endcase;
}
if (CCEQ(cc[VSUSP], c)) {
if (!ISSET(lflag, NOFLSH))
ttyflush(tp, FREAD);
ttyecho(c, tp);
if (tp->t_pgrp != NULL) {
PGRP_LOCK(tp->t_pgrp);
pgsignal(tp->t_pgrp, SIGTSTP, 1);
PGRP_UNLOCK(tp->t_pgrp);
}
goto endcase;
}
}
The first section handles ^C and ^\ (and flushes read and write), and
the second handles ^Z (only flushes read).
In any case, we should consider if the flush in Linux should precede the
signal. Perhaps interrupting before the flush can happen is bad?
Perhaps this has something to do with anomalies observed (below) with
other ordering, or maybe I'm seeing other latent bugs not involved with
this at all.
Now to the results of the ordering...
flush, echo, signal (the way it is now)
-------------------
* Follows FreeBSD's ordering
* works on both console and xterm
* seems to delay interrupt when process is IO bound
echo, signal, flush (proposed in Elias' patch)
-------------------
* seems to fix IO bound issue
* echo works in console but not xterm
signal, flush, echo
-------------------
* works in both console and xterm
* may cause late echo (and does not match BSD order)
* I tested inserting an artificial delay between flush and echo:
strange result: in console, echo does not appear; in xterm,
^C appears right before next prompt, but sometimes
echo does not appear, along with final program output
(something eats the output)
signal, echo, flush
-------------------
* same as above
So changing the order seems to always introduce some bugs or issues.
I'm still experimenting; feedback welcome!
-Joe
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-01 7:47 ` Elias Oltmanns
` (3 preceding siblings ...)
2008-07-02 21:26 ` Joe Peterson
@ 2008-07-04 20:10 ` Joe Peterson
2008-07-04 20:23 ` Alan Cox
4 siblings, 1 reply; 47+ messages in thread
From: Joe Peterson @ 2008-07-04 20:10 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Török Edwin, Alan Cox, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
Elias Oltmanns wrote:
>> I have encountered the following situation several times, but I've been
>> unable to come up with a way to reproduce this until now:
>> - some process is keeping the disk busy (some cron job for example:
>> updatedb, chkrootkit, ...)
>> - other processes that want to do I/O have to wait (this is normal)
>> - I have a (I/O bound) process running in my terminal, and I want to
>> interrupt it with Ctrl+C
>> - I type Ctrl+C several times, and the process is not interrupted for
>> several seconds (10-30 secs)
>> - if I type Ctrl+Z, and use kill %1 the process dies faster than
>> waiting for it to react to Ctrl+C
>
> The following patch to 2.6.26-rc8 fixes the issue for me. Perhaps we
> really want to do something else, but since I'm not all that familiar
> with the standard behaviour on other Unices and since the comment
> describing the changed order of function calls in the original commit
> didn't give the reason for that change, I leave that to more
> knowledgeable people.
I have tried to reproduce the original poster's issue on
2.6.26-rc8-git3 without success. In around 100 attempts (restarting the
disk activity process over each time it completed), it always broke out
after one ^C - one time took an extra second or two. Note that I did
not run latencytop (did not have it compiled in my kernel) - if that is
required for the test, let me know, but I assume it is just for
gathering info when the issue occurs.
Can you please try something for me? For one, apply the attached patch,
which removes what seems to be a redundant flush (since both calls end
up calling the same n_tty routine). This made no difference for me, but
I am curious if it might help you.
If you still see the problem, please try typing "stty noflsh" and try
again. This disables the flush step, which may be affecting you.
Again, this did not make a difference for me.
It will really help me to know the results of these steps for you.
As far as moving the flush after the signal, I have tried this (in the
patch I posted earlier), and it ends up causing various anomalies in
output, so I do not think that is the right solution.
-Joe
[-- Attachment #2: gentoo-sources-2.6.26-remove-redundant-flush.patch --]
[-- Type: text/x-patch, Size: 627 bytes --]
--- linux/drivers/char/n_tty.c.orig 2008-07-04 09:45:37.000000000 -0600
+++ linux/drivers/char/n_tty.c 2008-07-04 11:25:38.000000000 -0600
@@ -589,10 +589,8 @@
{
if (tty->pgrp)
kill_pgrp(tty->pgrp, sig, 1);
- if (flush || !L_NOFLSH(tty)) {
+ if (flush || !L_NOFLSH(tty))
n_tty_flush_buffer(tty);
- tty_driver_flush_buffer(tty);
- }
}
/**
@@ -765,10 +763,8 @@
* the order to be:
* 1) flush, 2) echo, 3) signal
*/
- if (!L_NOFLSH(tty)) {
+ if (!L_NOFLSH(tty))
n_tty_flush_buffer(tty);
- tty_driver_flush_buffer(tty);
- }
if (L_ECHO(tty))
echo_char(c, tty);
if (tty->pgrp)
^ permalink raw reply [flat|nested] 47+ messages in thread* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 20:10 ` Joe Peterson
@ 2008-07-04 20:23 ` Alan Cox
2008-07-04 21:17 ` Joe Peterson
2008-07-04 21:21 ` Andi Kleen
0 siblings, 2 replies; 47+ messages in thread
From: Alan Cox @ 2008-07-04 20:23 UTC (permalink / raw)
To: Joe Peterson; +Cc: Elias Oltmanns, Török Edwin, Linux Kernel
> disk activity process over each time it completed), it always broke out
> after one ^C - one time took an extra second or two. Note that I did
> not run latencytop (did not have it compiled in my kernel) - if that is
> required for the test, let me know, but I assume it is just for
> gathering info when the issue occurs.
I really don't think this is tty related looking at the code involved and
also the lack of actual measurements presented. More likely scheduler and
VM related changes.
Alan
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 20:23 ` Alan Cox
@ 2008-07-04 21:17 ` Joe Peterson
2008-07-11 14:47 ` Alan Cox
2008-07-04 21:21 ` Andi Kleen
1 sibling, 1 reply; 47+ messages in thread
From: Joe Peterson @ 2008-07-04 21:17 UTC (permalink / raw)
To: Alan Cox; +Cc: Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox wrote:
>> disk activity process over each time it completed), it always broke out
>> after one ^C - one time took an extra second or two. Note that I did
>> not run latencytop (did not have it compiled in my kernel) - if that is
>> required for the test, let me know, but I assume it is just for
>> gathering info when the issue occurs.
>
> I really don't think this is tty related looking at the code involved and
> also the lack of actual measurements presented. More likely scheduler and
> VM related changes.
Alan, many thanks for your assessment - it's greatly appreciated. Now
that I've looked into it, the only peculiar thing I see is the redundant
flush_buffer call. Do you think that should be removed anyway? It
seems that the following two calls do the same thing in n_tty.c:
n_tty_flush_buffer(tty);
tty_driver_flush_buffer(tty);
If this looks redundant, let me know, and I can submit a patch to just
call n_tty_flush_buffer(tty).
-Thanks, Joe
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 21:17 ` Joe Peterson
@ 2008-07-11 14:47 ` Alan Cox
2008-07-12 0:44 ` Joe Peterson
0 siblings, 1 reply; 47+ messages in thread
From: Alan Cox @ 2008-07-11 14:47 UTC (permalink / raw)
To: Joe Peterson; +Cc: Elias Oltmanns, Török Edwin, Linux Kernel
O> seems that the following two calls do the same thing in n_tty.c:
>
> n_tty_flush_buffer(tty);
> tty_driver_flush_buffer(tty);
Sorry missed this originally - they don't do the same thing. The first
clears out anything in the ldisc internally the second clears out
anything in the tty driver itself.
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-11 14:47 ` Alan Cox
@ 2008-07-12 0:44 ` Joe Peterson
2008-07-12 10:37 ` Alan Cox
0 siblings, 1 reply; 47+ messages in thread
From: Joe Peterson @ 2008-07-12 0:44 UTC (permalink / raw)
To: Alan Cox; +Cc: Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox wrote:
>> seems that the following two calls do the same thing in n_tty.c:
>> n_tty_flush_buffer(tty);
>> tty_driver_flush_buffer(tty);
>
> Sorry missed this originally - they don't do the same thing. The first
> clears out anything in the ldisc internally the second clears out
> anything in the tty driver itself.
Alan, before I wrote this, I had put a printk() in n_tty_flush_buffer()
and noticed it was called twice when ^C was hit in an xterm. Then I did
some investigating into this a few days ago, putting a dump_stack() in
n_tty_flush_buffer() so I could see how it is being called.
I realized the calls indeed have different purposes at that point. I
still wonder, though, why when processing a ^C in an xterm/pty,
n_tty_flush_buffer() does get called again from the driver call. See
the two traces below from the ldisc and driver flushes:
*********** CTRL-C received
Pid: 4669, comm: xterm Not tainted 2.6.26-rc8-git3 #1
[<c0283126>] n_tty_flush_buffer+0xd/0x67
[<c028385c>] n_tty_receive_buf+0x398/0xd87
[<c031824b>] ? sock_aio_read+0xed/0xfb
[<c017a824>] ? do_sync_read+0xab/0xe9
[<c0136257>] ? hrtimer_forward+0xd6/0xec
[<c0285569>] pty_write+0x2d/0x3b
[<c0283450>] write_chan+0x21b/0x28f
[<c011bfa4>] ? default_wake_function+0x0/0xd
[<c028103f>] tty_write+0x14e/0x1be
[<c0283235>] ? write_chan+0x0/0x28f
[<c017a8ec>] ? rw_verify_area+0x8a/0xad
[<c0280ef1>] ? tty_write+0x0/0x1be
[<c017ae88>] vfs_write+0x8c/0x133
[<c017b48c>] sys_write+0x3b/0x60
[<c0103aa3>] sysenter_past_esp+0x78/0xb1
=======================
Pid: 4669, comm: xterm Not tainted 2.6.26-rc8-git3 #1
[<c02857c5>] ? pty_unthrottle+0x15/0x21
[<c0283126>] n_tty_flush_buffer+0xd/0x67
[<c0285663>] pty_flush_buffer+0x20/0x67
[<c038ae61>] ? _spin_unlock_irqrestore+0x1b/0x2f
[<c0284934>] tty_driver_flush_buffer+0x13/0x15
[<c0283863>] n_tty_receive_buf+0x39f/0xd87
[<c031824b>] ? sock_aio_read+0xed/0xfb
[<c017a824>] ? do_sync_read+0xab/0xe9
[<c0136257>] ? hrtimer_forward+0xd6/0xec
[<c0285569>] pty_write+0x2d/0x3b
[<c0283450>] write_chan+0x21b/0x28f
[<c011bfa4>] ? default_wake_function+0x0/0xd
[<c028103f>] tty_write+0x14e/0x1be
[<c0283235>] ? write_chan+0x0/0x28f
[<c017a8ec>] ? rw_verify_area+0x8a/0xad
[<c0280ef1>] ? tty_write+0x0/0x1be
[<c017ae88>] vfs_write+0x8c/0x133
[<c017b48c>] sys_write+0x3b/0x60
[<c0103aa3>] sysenter_past_esp+0x78/0xb1
=======================
In a Linux virtual console/tty, however, the tty driver flush doesn't
call the ldisc flush again in my tests:
*********** CTRL-C received
Pid: 6, comm: events/0 Not tainted 2.6.26-rc8-git3 #1
[<c0283126>] n_tty_flush_buffer+0xd/0x67
[<c028385c>] n_tty_receive_buf+0x398/0xd87
[<c038ab32>] ? _spin_lock_irqsave+0x27/0x41
[<c038ab32>] ? _spin_lock_irqsave+0x27/0x41
[<c038ae61>] ? _spin_unlock_irqrestore+0x1b/0x2f
[<c027f3ee>] ? tty_ldisc_try+0x2f/0x35
[<c027f9e2>] flush_to_ldisc+0xde/0x14d
[<c013129d>] run_workqueue+0x78/0x102
[<c027f904>] ? flush_to_ldisc+0x0/0x14d
[<c0131a0b>] ? worker_thread+0x0/0xbf
[<c0131abf>] worker_thread+0xb4/0xbf
[<c0133f4d>] ? autoremove_wake_function+0x0/0x33
[<c0133e77>] kthread+0x3b/0x64
[<c0133e3c>] ? kthread+0x0/0x64
[<c0104753>] kernel_thread_helper+0x7/0x10
=======================
-Joe
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 20:23 ` Alan Cox
2008-07-04 21:17 ` Joe Peterson
@ 2008-07-04 21:21 ` Andi Kleen
2008-07-04 21:14 ` Alan Cox
1 sibling, 1 reply; 47+ messages in thread
From: Andi Kleen @ 2008-07-04 21:21 UTC (permalink / raw)
To: Alan Cox
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>> disk activity process over each time it completed), it always broke out
>> after one ^C - one time took an extra second or two. Note that I did
>> not run latencytop (did not have it compiled in my kernel) - if that is
>> required for the test, let me know, but I assume it is just for
>> gathering info when the issue occurs.
>
> I really don't think this is tty related looking at the code involved and
> also the lack of actual measurements presented. More likely scheduler and
> VM related changes.
Why should the scheduler or VM behave differently for Ctrl-Z+kill
versus Ctrl-C?
Doesn't make sense to me. And yes I see this here regularly and it started
at some point.
-Andi
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 21:21 ` Andi Kleen
@ 2008-07-04 21:14 ` Alan Cox
2008-07-04 21:36 ` Andi Kleen
0 siblings, 1 reply; 47+ messages in thread
From: Alan Cox @ 2008-07-04 21:14 UTC (permalink / raw)
To: Andi Kleen
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
> Doesn't make sense to me. And yes I see this here regularly and it started
> at some point.
Lets have some profiles and TSC numbers then. I'm happy to believe some
specific combination of hardware/timing shows up a real problem but
looking at the tiny amount of code involved I can see no sane explanation
as to why at this point.
I'm not going to look further into it without real serious data from
people seeing it.
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 21:14 ` Alan Cox
@ 2008-07-04 21:36 ` Andi Kleen
2008-07-04 21:44 ` Alan Cox
0 siblings, 1 reply; 47+ messages in thread
From: Andi Kleen @ 2008-07-04 21:36 UTC (permalink / raw)
To: Alan Cox
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox wrote:
>> Doesn't make sense to me. And yes I see this here regularly and it started
>> at some point.
>
> Lets have some profiles and TSC numbers then. I'm happy to believe some
> specific combination of hardware/timing shows up a real problem but
> looking at the tiny amount of code involved I can see no sane explanation
> as to why at this point.
Well Elias showed that changing the order made a visible difference.
> I'm not going to look further into it without real serious data from
> people seeing it.
So you're saying multiple independent people suffer from some kind of
hallucination?
-Andi
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 21:36 ` Andi Kleen
@ 2008-07-04 21:44 ` Alan Cox
2008-07-04 22:09 ` Andi Kleen
0 siblings, 1 reply; 47+ messages in thread
From: Alan Cox @ 2008-07-04 21:44 UTC (permalink / raw)
To: Andi Kleen
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
> > I'm not going to look further into it without real serious data from
> > people seeing it.
>
> So you're saying multiple independent people suffer from some kind of
> hallucination?
I'm saying provide some data.
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 21:44 ` Alan Cox
@ 2008-07-04 22:09 ` Andi Kleen
2008-07-05 10:34 ` Alan Cox
0 siblings, 1 reply; 47+ messages in thread
From: Andi Kleen @ 2008-07-04 22:09 UTC (permalink / raw)
To: Alan Cox
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox wrote:
>>> I'm not going to look further into it without real serious data from
>>> people seeing it.
>> So you're saying multiple independent people suffer from some kind of
>> hallucination?
>
> I'm saying provide some data.
It sounds more like the ostrich approach to bug handling to me.
So what kind of data do you want? Someone watching a wallclock while
comparing Ctrl-Z+kill versus Ctrl-C on a IO intensive process?
-Andi
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-04 22:09 ` Andi Kleen
@ 2008-07-05 10:34 ` Alan Cox
2008-07-05 11:00 ` Andi Kleen
0 siblings, 1 reply; 47+ messages in thread
From: Alan Cox @ 2008-07-05 10:34 UTC (permalink / raw)
To: Andi Kleen
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
> So what kind of data do you want? Someone watching a wallclock while
> comparing Ctrl-Z+kill versus Ctrl-C on a IO intensive process?
Latency traces with timestamps might be quite useful, they'd probably
also tell you why it happened. I can't reproduce it, nobody has provided
numbers so even if I wanted to work on it I couldn't do much.
Instead I have lots of real tty, ATA and other work that needs doing
which has quantified data, is reproducable and needs doing, so that will
get done.
Alan
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 10:34 ` Alan Cox
@ 2008-07-05 11:00 ` Andi Kleen
2008-07-05 11:34 ` Alan Cox
2008-07-05 12:49 ` Elias Oltmanns
0 siblings, 2 replies; 47+ messages in thread
From: Andi Kleen @ 2008-07-05 11:00 UTC (permalink / raw)
To: Alan Cox
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
Alan Cox wrote:
>> So what kind of data do you want? Someone watching a wallclock while
>> comparing Ctrl-Z+kill versus Ctrl-C on a IO intensive process?
>
> Latency traces with timestamps might be quite useful, they'd probably
> also tell you why it happened.
Ok so you're asking someone else to debug it.
I can't reproduce it, nobody has provided
> numbers so even if I wanted to work on it I couldn't do much.
Well we had a patch (although I haven't tried it yet)
http://marc.info/?l=linux-kernel&m=121489861508496&w=2
Is that not concrete enough?
> Instead I have lots of real tty, ATA and other work that needs doing
> which has quantified data,
All the reporters provided time stamp traces? @)
-Andi
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 11:00 ` Andi Kleen
@ 2008-07-05 11:34 ` Alan Cox
2008-07-05 12:49 ` Elias Oltmanns
1 sibling, 0 replies; 47+ messages in thread
From: Alan Cox @ 2008-07-05 11:34 UTC (permalink / raw)
To: Andi Kleen
Cc: Joe Peterson, Elias Oltmanns, Török Edwin, Linux Kernel
> Well we had a patch (although I haven't tried it yet)
>
> http://marc.info/?l=linux-kernel&m=121489861508496&w=2
>
> Is that not concrete enough?
No. Apply a little engineering to this instead of running around acting
on random unexplained proposals people don't agree works. Right now you
look like a politician - mindlessly squawking about things you've not
tried and proposing anything and everything which might improve matters
without working out if they would and why.
The tty layer is getting improved and fixed by applying proper
engineering methods not by random flapping.
So:
observe, and if need be experiment to get further data
produce a model of the behaviour which explains the data
make the changes the explanation requires
test
repeat
> > Instead I have lots of real tty, ATA and other work that needs doing
> > which has quantified data,
>
> All the reporters provided time stamp traces?
No they provided relevant data or enough info I can reproduce it here.
Alan
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 11:00 ` Andi Kleen
2008-07-05 11:34 ` Alan Cox
@ 2008-07-05 12:49 ` Elias Oltmanns
2008-07-05 14:01 ` Andi Kleen
2008-07-05 19:58 ` Joe Peterson
1 sibling, 2 replies; 47+ messages in thread
From: Elias Oltmanns @ 2008-07-05 12:49 UTC (permalink / raw)
To: Andi Kleen; +Cc: Alan Cox, Joe Peterson, Török Edwin, Linux Kernel
The discussion seems to have become a little heated, so allow me to step
in here ...
Andi Kleen <andi@firstfloor.org> wrote:
> Alan Cox wrote:
[...]
> I can't reproduce it, nobody has provided
>> numbers so even if I wanted to work on it I couldn't do much.
>
> Well we had a patch (although I haven't tried it yet)
>
> http://marc.info/?l=linux-kernel&m=121489861508496&w=2
>
> Is that not concrete enough?
Actually, I'm not to sure whether this really fixes the root cause of
the problem -- I never have been and I meant to indicate as much in my
email. It's been the first time I looked at the tty code and the patch
was mainly guess work; all it does is reverting parts of a previous
patch. My hope was to direct other people's (read: those who no the tty
code) attention to a change that seemed to cause the problem. Perhaps I
didn't make it clear enough at the time that I didn't really know *why*
this change should cause any problem in the first place.
Now, the situation has become even more delicate. Joe has reported that
my patch breaks echoing in the xterm and, rather to my embarrassment, I
have to report that it doesn't even fix the issue I claumed it would.
All it apparently does is making the problem slightly harder to
reproduce which is why it didn't occur in my tests at the time.
Since I have been concentrating on other things over the last days, it's
been only today that I discovered this. Moreover, some more testing lead
me to believe that the root issue has been present in mainline at least
since 2.6.19 and Joe's change in 2.6.25 only made it visible because you
now occasionally get something like
^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z
on your screen when you keep pressing Ctrl+Z until the prompt appears;
in 2.6.24, for instance, there would just be a short delay but no
irritating output on the screen that makes you wonder.
Quite frankly, I'm a bit at a loss as to how I should go about debugging
this and what kind of data might be useful to others to do so. In
another email Alan talked about latency traces which is something new to
me. Since the OP talked about latencytop, I hope that this tool provides
the data Alan requires and will install and make use of it accordingly
(expect some results later today or tomorrow). Of course, I'm always
open to other / additional suggestions.
Regards,
Elias
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 12:49 ` Elias Oltmanns
@ 2008-07-05 14:01 ` Andi Kleen
2008-07-05 19:58 ` Joe Peterson
1 sibling, 0 replies; 47+ messages in thread
From: Andi Kleen @ 2008-07-05 14:01 UTC (permalink / raw)
To: Elias Oltmanns
Cc: Alan Cox, Joe Peterson, Török Edwin, Linux Kernel
>
> Actually, I'm not to sure whether this really fixes the root cause of
> the problem
Ok.
>
> on your screen when you keep pressing Ctrl+Z until the prompt appears;
> in 2.6.24, for instance, there would just be a short delay but no
> irritating output on the screen that makes you wonder.
>
> Quite frankly, I'm a bit at a loss as to how I should go about debugging
> this and what kind of data might be useful to others to do so. In
> another email Alan talked about latency traces which is something new to
> me. Since the OP talked about latencytop,
I don't think latencytop would help to be frankly.
> I hope that this tool provides
> the data Alan requires and will install and make use of it accordingly
> (expect some results later today or tomorrow). Of course, I'm always
> open to other / additional suggestions.
The way to do latency traces is to install the -rt patchkit, don't
actually enable any of the RT features there, but enable CONFIG_FUNCTION_TRACE.
The interface is unfortunately quite user unfriendly and it takes
significant effort to set it up in a way and trigger
at the right point and on the right CPU that you can actually
get usable traces in my experience.
The advantage is that once you have the trace for the right
place (in this case from Ctrl-C to process exit) it is usually
clear what the problem is. You'll have done all the work
for Alan then.
Also the work to do this is likely similar in effort to just bisecting
it.
-Andi
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 12:49 ` Elias Oltmanns
2008-07-05 14:01 ` Andi Kleen
@ 2008-07-05 19:58 ` Joe Peterson
2008-07-06 8:28 ` Elias Oltmanns
1 sibling, 1 reply; 47+ messages in thread
From: Joe Peterson @ 2008-07-05 19:58 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: Andi Kleen, Alan Cox, Török Edwin, Linux Kernel
Elias Oltmanns wrote:
> Now, the situation has become even more delicate. Joe has reported that
> my patch breaks echoing in the xterm and, rather to my embarrassment, I
> have to report that it doesn't even fix the issue I claumed it would.
> All it apparently does is making the problem slightly harder to
> reproduce which is why it didn't occur in my tests at the time.
Elias, thanks for your report. I could not reproduce the originally
posted test case, but I wrote a small program that continuously produces
output as a test. One thing I noticed was that the ease of breaking out
of this program is affected quite a bit by other system/CPU activity.
For example, if I was compiling the kernel, it became *easier* to break
out (presumably because the I/O from the test program was getting less
continuous CPU and so therefore the interrupt get "get in"). Similarly,
if I moved the xterm window around on the screen (causing other activity
by doing that) while waiting for the I/O program to terminate after
hitting ^C, it would often break out at that point.
So I do believe that one's subjective impression of how easy it is to
break out of such an I/O-bound program can be affected by the general
state of the system, and therefore it becomes fairly hard to draw a
certain conclusion.
> Since I have been concentrating on other things over the last days, it's
> been only today that I discovered this. Moreover, some more testing lead
> me to believe that the root issue has been present in mainline at least
> since 2.6.19 and Joe's change in 2.6.25 only made it visible because you
> now occasionally get something like
> ^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z
Ah! Yes, this makes a lot of sense, actually, and is a good example of
a problem masquerading as something else. Thanks much for this insight.
Knowing that the problem could have been around pre-2.6.25 is very
useful info as well, and does indeed agree with Alan's thoughts that the
issue is likely caused by something else (VM, scheduler, etc.).
> Quite frankly, I'm a bit at a loss as to how I should go about debugging
> this and what kind of data might be useful to others to do so.
If you can, please try the new patch I attached to the post:
http://marc.info/?l=linux-kernel&m=121520229900676&w=2
It removes the call to tty_driver_flush_buffer(), which comes right
after n_tty_flush_buffer() in n_tty.c. It will probably make no
difference, but it would be good to hear either way. I am not sure if
both calls are needed (if anyone reading this knows why both are called
from n_tty.c, let me know), but I do know that the latter
(tty_driver_flush_buffer) call ends up calling n_tty_flush_buffer as
well, causing two flushes in a row.
And also, if you can, try doing 'stty noflsh' and then the test case
again to see if this alters behavior. This may be good to know as well,
even if the flush is not centrally involved in the issue.
Thanks, Joe
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: Ctrl+C doesn't interrupt process waiting for I/O
2008-07-05 19:58 ` Joe Peterson
@ 2008-07-06 8:28 ` Elias Oltmanns
0 siblings, 0 replies; 47+ messages in thread
From: Elias Oltmanns @ 2008-07-06 8:28 UTC (permalink / raw)
To: Joe Peterson; +Cc: Andi Kleen, Alan Cox, Török Edwin, Linux Kernel
Joe Peterson <joe@skyrush.com> wrote:
> Elias Oltmanns wrote:
[...]
>> Quite frankly, I'm a bit at a loss as to how I should go about debugging
>> this and what kind of data might be useful to others to do so.
>
> If you can, please try the new patch I attached to the post:
>
> http://marc.info/?l=linux-kernel&m=121520229900676&w=2
Sorry, I just forgot to mention that I had already done that. It doesn't
make any difference as far as I can see (not that I'm surprised about
it).
[...]
> And also, if you can, try doing 'stty noflsh' and then the test case
> again to see if this alters behavior. This may be good to know as well,
> even if the flush is not centrally involved in the issue.
No, that didn't make any difference either.
Regards,
Elias
^ permalink raw reply [flat|nested] 47+ messages in thread