WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xen console output delay

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xen console output delay
From: "Dan Kuebrich" <dan.kuebrich@xxxxxxxxx>
Date: Fri, 14 Mar 2008 15:19:43 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Mar 2008 12:20:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=mX7iYcNJZq0CknowgFa8HCOhOrpqGSeDIWeK99nMtxY=; b=DH6u0p/nH449UjKENXAfekq+tJcho43VvW16ob/qufTAn6VxZfdjMm10OeokAhqVQe5OeULEOHFrt76AzYk0cQBmgWQVJ6GlIPrUrF9GiqI1uNdFNi1eHT7NDyFC/LCzjQhHq8MlDwxwsuh7owHc8iF/UB1uXkATaKZZY67R33c=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=vvIVk6abfKiAPfaX03iKlr8VXWBelynRRhYYt/xoedRgY2snmmaVYqqcfvaww6f4fqotAl2owFHbLZ/Xj3EjS65MbNo/ciniFJvHH47q/XSRO2dZ8HJX3pVwMN6MSA/EYn/Wy1/ZO2nmoWSWFwqXSBxPOgVURefvABB6rsImsLU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3FFF0ED.14FE9%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <d1d47c910803131726w3f2118e2l76295410952ee254@xxxxxxxxxxxxxx> <C3FFF0ED.14FE9%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 running)?  I couldn't find anything in console/daemon/io.c.

2. If rate limiting were implemented, it doesn't seem to be flooded entirely.  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) does not "flush" them--it still takes several seconds after before 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@xxxxxxxxxxxxx> 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 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@xxxxxxxxx> wrote:

Hello all,

I am working on writing a console driver for an OS on Xen and am running into a strange delay regarding console output.  I am using the ring buffer (not the hypercall) for output, and signaling with HYPERVISOR_event_channel_op after every character is written.

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 notified.  Sometimes, the character appears instantly in the console output.  Other 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel