[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 00/25 v7] SBSA UART emulation support in Xen



Hi Wei,

On 15/08/17 10:49, Wei Liu wrote:
On Thu, Aug 10, 2017 at 06:51:24PM +0100, Julien Grall wrote:
The interface between Xen and xenconsoled can be asynchronous, it can
opt to queue X characters before sending an event, also setup a oneshot
timer to avoid hanging.

This however has some other implications -- it might not be as reliable
as the original method because data is not guaranteed to hit backend. If
the guest crashes very early on, depending the actual implementation you
might not be able get the data.

Would it be possible to ask xenconsoled to dump everything on domain crash?
Some kind of synchronization.


No, not at the moment. If the data is still in Xen and destroyed,
xenconsoled can't do anything.

The vUART emulation is directly queuing the data, there are no intermediate
buffer. So all the data would be in the shared ring available for
xenconsoled to go through.

It would be quite a useful enhancement for when the guest crash.


What I meant was actually "If the data is still in the ring". There is
no synchronisation between Xen and xenconsoled to let the latter pull
out all data before destroying the guest.

I don't think you would need synchronisation between Xen and xenconsoled at domain destruction. Given that xenconsoled would have to unmap the page, I was suggesting that it makes sure that cons == prod before destroying the instance. So all the character queued would be displayed on the console.


As it stands, if we go with the fully-synchronised approach for now,
that won't be a problem. But when you want to fiddle with the BUSY bit
or any other optimisation -- leaving more data in the ring -- that might
cause data loss.

The fully-synchronised solution is far too slow, we are looking at optimization to avoid the synchronization for every single character. This would leave some potential data loss (max a few characters) if the domain crashed.


I'm not against bumping the rate-limit, but I want a justification and
want to consider as many approaches as possible. Ultimately the final
decision is up to you and Stefano.

I am not in favor of bumping the rate-limit at the moment. I believe we can solve the problem directly in the emulation. I spoke with Bhupinder about various solution that seem promising.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.