All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
@ 2010-10-27 16:54 Chris Metcalf
  2010-10-27 19:21   ` Alan Cox
  2010-11-02  0:35   ` Michael Ellerman
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Metcalf @ 2010-10-27 16:54 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev

The tile architecture uses this framework for our serial console,
and our users complain that the delay of up to two seconds feels like
the machine has gone non-responsive and is disturbing.  By contrast,
a delay of up to half a second feels like just the normal sort of
delay caused by swapping, network lag, etc. and is not noticeable.
The overhead is obviously not much greater.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---

I'm happy to push this via the tile tree if the linuxppc-dev folks
want to give me an acked-by, or you can take it into your tree.  Thanks!

 drivers/char/hvc_console.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 3afd62e..1df5431 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -565,11 +565,11 @@ static int hvc_chars_in_buffer(struct tty_struct *tty)
  * and during console activity we will use a default MIN_TIMEOUT of 10.  When
  * the console is idle, we increase the timeout value on each pass through
  * msleep until we reach the max.  This may be noticeable as a brief (average
- * one second) delay on the console before the console responds to input when
+ * 0.25 second) delay on the console before the console responds to input when
  * there has been no input for some time.
  */
 #define MIN_TIMEOUT		(10)
-#define MAX_TIMEOUT		(2000)
+#define MAX_TIMEOUT		(500)
 static u32 timeout = MIN_TIMEOUT;
 
 #define HVC_POLL_READ	0x00000001
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
  2010-10-27 16:54 [PATCH] drivers/char/hvc_console.c: reduce max idle timeout Chris Metcalf
@ 2010-10-27 19:21   ` Alan Cox
  2010-11-02  0:35   ` Michael Ellerman
  1 sibling, 0 replies; 9+ messages in thread
From: Alan Cox @ 2010-10-27 19:21 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: linux-kernel, linuxppc-dev

On Wed, 27 Oct 2010 12:54:27 -0400
Chris Metcalf <cmetcalf@tilera.com> wrote:

> The tile architecture uses this framework for our serial console,

That may be a mistake unless your console is genuinely only capable of
polled input.

Alan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
@ 2010-10-27 19:21   ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2010-10-27 19:21 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: linuxppc-dev, linux-kernel

On Wed, 27 Oct 2010 12:54:27 -0400
Chris Metcalf <cmetcalf@tilera.com> wrote:

> The tile architecture uses this framework for our serial console,

That may be a mistake unless your console is genuinely only capable of
polled input.

Alan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
  2010-10-27 19:21   ` Alan Cox
@ 2010-10-27 19:46     ` Chris Metcalf
  -1 siblings, 0 replies; 9+ messages in thread
From: Chris Metcalf @ 2010-10-27 19:46 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, linuxppc-dev

On 10/27/2010 3:21 PM, Alan Cox wrote:
> On Wed, 27 Oct 2010 12:54:27 -0400 Chris Metcalf <cmetcalf@tilera.com> wrote:
>> The tile architecture uses this framework for our serial console,
> That may be a mistake unless your console is genuinely only capable of
> polled input.

The console is in fact interrupt-driven within the hypervisor, and data is
buffered there.  However, the current hypervisor console API is only
"write" and "read".  We have a bugzilla to add console interrupts to the
hypervisor API and use them from Linux, but we haven't done it yet.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
@ 2010-10-27 19:46     ` Chris Metcalf
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Metcalf @ 2010-10-27 19:46 UTC (permalink / raw)
  To: Alan Cox; +Cc: linuxppc-dev, linux-kernel

On 10/27/2010 3:21 PM, Alan Cox wrote:
> On Wed, 27 Oct 2010 12:54:27 -0400 Chris Metcalf <cmetcalf@tilera.com> wrote:
>> The tile architecture uses this framework for our serial console,
> That may be a mistake unless your console is genuinely only capable of
> polled input.

The console is in fact interrupt-driven within the hypervisor, and data is
buffered there.  However, the current hypervisor console API is only
"write" and "read".  We have a bugzilla to add console interrupts to the
hypervisor API and use them from Linux, but we haven't done it yet.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
  2010-10-27 16:54 [PATCH] drivers/char/hvc_console.c: reduce max idle timeout Chris Metcalf
@ 2010-11-02  0:35   ` Michael Ellerman
  2010-11-02  0:35   ` Michael Ellerman
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2010-11-02  0:35 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: linux-kernel, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

On Wed, 2010-10-27 at 12:54 -0400, Chris Metcalf wrote:
> The tile architecture uses this framework for our serial console,
> and our users complain that the delay of up to two seconds feels like
> the machine has gone non-responsive and is disturbing.  By contrast,
> a delay of up to half a second feels like just the normal sort of
> delay caused by swapping, network lag, etc. and is not noticeable.
> The overhead is obviously not much greater.

It's 4 times greater.

We picked 2 seconds because it gave a reasonable trade off between
responsiveness and load. I'm not convinced that half a second is a
better number.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
@ 2010-11-02  0:35   ` Michael Ellerman
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2010-11-02  0:35 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: linuxppc-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

On Wed, 2010-10-27 at 12:54 -0400, Chris Metcalf wrote:
> The tile architecture uses this framework for our serial console,
> and our users complain that the delay of up to two seconds feels like
> the machine has gone non-responsive and is disturbing.  By contrast,
> a delay of up to half a second feels like just the normal sort of
> delay caused by swapping, network lag, etc. and is not noticeable.
> The overhead is obviously not much greater.

It's 4 times greater.

We picked 2 seconds because it gave a reasonable trade off between
responsiveness and load. I'm not convinced that half a second is a
better number.

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
  2010-11-02  0:35   ` Michael Ellerman
@ 2010-11-02  2:21     ` Chris Metcalf
  -1 siblings, 0 replies; 9+ messages in thread
From: Chris Metcalf @ 2010-11-02  2:21 UTC (permalink / raw)
  To: michael; +Cc: linux-kernel, linuxppc-dev

On 11/1/2010 8:35 PM, Michael Ellerman wrote:
> On Wed, 2010-10-27 at 12:54 -0400, Chris Metcalf wrote:
>> The tile architecture uses this framework for our serial console,
>> and our users complain that the delay of up to two seconds feels like
>> the machine has gone non-responsive and is disturbing.  By contrast,
>> a delay of up to half a second feels like just the normal sort of
>> delay caused by swapping, network lag, etc. and is not noticeable.
>> The overhead is obviously not much greater.
> It's 4 times greater.
>
> We picked 2 seconds because it gave a reasonable trade off between
> responsiveness and load. I'm not convinced that half a second is a
> better number.

Perhaps the tradeoff should be tunable, then?  I think on our architecture
we're willing to pay a higher cost on the core running this task, since we
have many cores; we often have a core that mostly just runs miscellaneous
Linux administrative tasks anyway, so adding a bit more overhead there is
not significant for us.

This issue has caused multiple reports of unresponsiveness from our users,
so I'd be interested in finding a way to strike a balance.  We could use a
config option defaulting to 2 seconds (for example), or something more
dynamic (probably unnecessary).

Let me know your preference, if this sounds plausible, and I'll write up a
proposed patch.  Thanks.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drivers/char/hvc_console.c: reduce max idle timeout
@ 2010-11-02  2:21     ` Chris Metcalf
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Metcalf @ 2010-11-02  2:21 UTC (permalink / raw)
  To: michael; +Cc: linuxppc-dev, linux-kernel

On 11/1/2010 8:35 PM, Michael Ellerman wrote:
> On Wed, 2010-10-27 at 12:54 -0400, Chris Metcalf wrote:
>> The tile architecture uses this framework for our serial console,
>> and our users complain that the delay of up to two seconds feels like
>> the machine has gone non-responsive and is disturbing.  By contrast,
>> a delay of up to half a second feels like just the normal sort of
>> delay caused by swapping, network lag, etc. and is not noticeable.
>> The overhead is obviously not much greater.
> It's 4 times greater.
>
> We picked 2 seconds because it gave a reasonable trade off between
> responsiveness and load. I'm not convinced that half a second is a
> better number.

Perhaps the tradeoff should be tunable, then?  I think on our architecture
we're willing to pay a higher cost on the core running this task, since we
have many cores; we often have a core that mostly just runs miscellaneous
Linux administrative tasks anyway, so adding a bit more overhead there is
not significant for us.

This issue has caused multiple reports of unresponsiveness from our users,
so I'd be interested in finding a way to strike a balance.  We could use a
config option defaulting to 2 seconds (for example), or something more
dynamic (probably unnecessary).

Let me know your preference, if this sounds plausible, and I'll write up a
proposed patch.  Thanks.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-02  2:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 16:54 [PATCH] drivers/char/hvc_console.c: reduce max idle timeout Chris Metcalf
2010-10-27 19:21 ` Alan Cox
2010-10-27 19:21   ` Alan Cox
2010-10-27 19:46   ` Chris Metcalf
2010-10-27 19:46     ` Chris Metcalf
2010-11-02  0:35 ` Michael Ellerman
2010-11-02  0:35   ` Michael Ellerman
2010-11-02  2:21   ` Chris Metcalf
2010-11-02  2:21     ` Chris Metcalf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.