From: Keir Fraser Subject: Re: xen console output delay Date: Fri, 14 Mar 2008 19:37:32 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0858641807==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Kuebrich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============0858641807== Content-type: multipart/alternative; boundary="B_3288368259_6141765" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3288368259_6141765 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Sounds like it isn=B9t due to the rate limiting then. I=B9m not sure what it might be in that case. Is your system uniprocessor and hence this could be scheduling latency? -- Keir On 14/3/08 19:19, "Dan Kuebrich" wrote: > Keir, >=20 > Thanks for the quick response. I did a little investigation and still ha= ve > questions about this. >=20 > 1. Is this rate-limiting implemented in xen 3.0.3 (which is what I'm runn= ing)? > I couldn't find anything in console/daemon/io.c. >=20 > 2. If rate limiting were implemented, it doesn't seem to be flooded entir= ely. > There should be only 1-2 event-channel notifications occurring per second= . > Additionally, sometimes printing one character, waiting a second, then > printing a second character (and thus triggering another notification) do= es > not "flush" them--it still takes several seconds after before flushing oc= curs. >=20 > Is there another possibility for what is going on here? >=20 > dan >=20 > On Fri, Mar 14, 2008 at 5:07 AM, Keir Fraser > wrote: >> Output to the console is rate-limited to 30 event-channel notifications = per >> 200ms. You could be hitting that limit: see the RATE_LIMIT_ values in >> tools/console/daemon/io.c: the logic is fairly easily defeated to test i= f >> that is what is stalling you. Batching your notifications a bit (e.g., o= nce >> per console line) might actually smooth things out a bit. >>=20 >> -- Keir >>=20 >>=20 >> On 14/3/08 00:26, "Dan Kuebrich" wrote: >>=20 >>> Hello all, >>>=20 >>> I am working on writing a console driver for an OS on Xen and am runnin= g >>> into a strange delay regarding console output. I am using the ring buf= fer >>> (not the hypercall) for output, and signaling with >>> HYPERVISOR_event_channel_op after every character is written. >>>=20 >>> The delay seems to occur _only_sometimes_ after a character is output. = I >>> have tracked it using GDB and noted that the delay happens after the >>> characters are put into the ring buffer and the event channel is notifi= ed. >>> Sometimes, the character appears instantly in the console output. Othe= r >>> times, it takes several seconds to show up. >>>=20 >>> I am using the standard xenconsole reader. Is there some sort of time-= based >>> buffering that occurs in the console output buffer? >>>=20 >>> The result I would like to achieve is latency-free console output. >>>=20 >>> Thanks, >>> dan >>>=20 >>>=20 >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >>=20 >=20 >=20 --B_3288368259_6141765 Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Re: [Xen-devel] xen console output delay Sound= s like it isn’t due to the rate limiting then. I’m not sure what= it might be in that case. Is your system uniprocessor and hence this could = be scheduling latency?

 -- Keir

On 14/3/08 19:19, "Dan Kuebrich" <dan.kuebrich@gmail.com> w= rote:

Keir,

Thanks for the quick response.  I did a little investigation and still= have questions about this.

1. Is this rate-limiting implemented in xen 3.0.3 (which is what I'm runnin= g)?  I couldn't find anything in console/daemon/io.c.

2. If rate limiting were implemented, it doesn't seem to be flooded entirel= y.  There should be only 1-2 event-channel notifications occurring per = second.  Additionally, sometimes printing one character, waiting a seco= nd, then printing a second character (and thus triggering another notificati= on) does not "flush" them--it still takes several seconds after be= fore flushing occurs.

Is there another possibility for what is going on here?

dan

On Fri, Mar 14, 2008 at 5:07 AM, Keir Fraser <keir.fraser@eu.citrix.com&= gt; wrote:
Output to the console is rate-limited to 30 event-chann= el notifications per 200ms. You could be hitting that limit: see the RATE_LI= MIT_ values in tools/console/daemon/io.c: the logic is fairly easily defeate= d to test if that is what is stalling you. Batching your notifications a bit= (e.g., once per console line) might actually smooth things out a bit.

 -- Keir


On 14/3/08 00:26, "Dan Kuebrich" <dan.kuebrich@gmail.com> w= rote:

Hello all,

I am working on writing a console driver for an OS on Xen and am running in= to a strange delay regarding console output.  I am using the ring buffe= r (not the hypercall) for output, and signaling with HYPERVISOR_event_channe= l_op after every character is written.

The delay seems to occur _only_sometimes_ after a character is output. &nbs= p;I have tracked it using GDB and noted that the delay happens after the cha= racters are put into the ring buffer and the event channel is notified. &nbs= p;Sometimes, the character appears instantly in the console output.  Ot= her times, it takes several seconds to show up.

I am using the standard xenconsole reader.  Is there some sort of time= -based buffering that occurs in the console output buffer?

The result I would like to achieve is latency-free console output.

Thanks,
dan


____________________= ___________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/x= en-devel




--B_3288368259_6141765-- --===============0858641807== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0858641807==--