From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Console Daemon Date: Tue, 02 Aug 2005 11:30:28 -0500 Message-ID: <42EF9FA4.8050606@us.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: xen-devel , Rusty Russell , Ian Pratt , Christian Limpach , Robert Read List-Id: xen-devel@lists.xenproject.org Ian Pratt wrote: >>Today it buffers N bytes worth of data in memory regardless >>of whether the tty is connected (or reading from). How much >>it buffers is configurable via the store (by default the >>buffer has no limit so ensure console data is never lost). >> >> > >If you connect and disconnect do you continue from where you left off or >get sent the last N bytes again? > > You continue where you left off. >I think the former behaviour is definitely preferable, or at the very >least should be a configuration option. > > What I was thinking is having the following layout in the store: /domain//console/tty /domain//console/limit /domain//console/history tty is obviously the tty for the domain (if tty doesn't exist, it means someone is connected already) limit is the maximum amount of data (in bytes) that will be buffered history is the amount of history (in bytes) that will be saved. When a client reconnects, they will first receive whatever's in the history. Does this seem agreeable? >Please can you explain how tty's get allocated. > > In the current scheme, a tty is allocated for each domain whenever data arrives for the domain or if consoled detects a new domain was created. It currently polls to see if new domains were created every second. You can avoid the race condition by signalling consoled which will break it out of it's select loop. Not very pretty but it solves the problem of something like xm create -c. Regards, Anthony Liguori >Thanks, >Ian > > > >>Keeping a history wouldn't be a hard change. I'll submit >>some patches. >> >>Regards, >> >>Anthony Liguori >> >> >> >>>Thanks, >>>Ian >>> >>> >>> >>> >>> >> >> > > >