qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4 V5] char: Add CirMemCharDriver and provide Q


From: Lei Li
Subject: Re: [Qemu-devel] [PATCH 0/4 V5] char: Add CirMemCharDriver and provide QMP interface
Date: Fri, 26 Oct 2012 12:56:05 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0

Please ignore this thread and review the other thread also titled V5.
Sorry for the mis-sending mostly caused by the unconsciousness
at midnight...

On 10/26/2012 03:48 AM, Lei Li wrote:
This patch series attempts to add new char backend CirMemCharDriver with
a circular buffer and expose it to users by introducing QMP interface
memchar-write and memchar-read and via the command line like the other
CharDriverStates.

Serial ports in qemu always use CharDriverStates as there backends,
Right now, all of our backends always try to write the data from the
guest to a socket or file. The concern from OpenStack is that this could
lead to unbounded disk space usage since they log the serial output.
For more detail of the background info:
https://bugs.launchpad.net/nova/+bug/832507

So we want to use a circular buffer in QEMU instead, and then OpenStack
can periodically read the buffer in QEMU and log it.

The QMP commands introduced like:

{ 'command': 'memchar-write',
   'data': {'chardev': 'str', 'size': 'int', 'data': 'str',
            'format': 'str' } }

{ 'command': 'memchar-read',
   'data': {'chardev': 'str', 'size': 'int', 'format': 'str' },
   'returns': 'str' }

Expose CirMemCharDriver via the command line like:

qemu -chardev memchr,id=foo,maxcapacity=640k -serial chardev:foo

Introduce HMP command 'console' like:

(qemu) console foo
foo: Input data

Note:
Now all of the feature were implemented, and the pervious comments
are fixed up too. Please comment and let me know if there is anything
else need to be improved. Your suggestion would be very appreciated!

Changes since v4:
   - Get rid of all CongestionControl bits, and assume a dropping behavior
     based on Luiz's suggestion for now. Will add it when we add async
     support to QMP.
   - Squashed the patches about CirMemCharDriver in one.
   - Other fixups from Luiz.

Changes since v3:
   - Improve the algorithm of circular buffer based on Anthony's
     suggestion.
   - Some changes suggested by Luiz and Blue.
   - And other fixups.

Changes since v2:
   - Add congestion mechanism. For the 'block' option as sync command,
     will support it later when we gain the necessary infrastructure
     enhancement.
   - Add HMP 'console' command so that can interact with multiple
     chardevs via a single monitor socket.
   - Make the circular buffer backend and the current MemCharDriver
     live in parallel, expose a new char backend with circular buffer
     CirMemCharDriver suggested by Luiz.
   - Other fixs from Eric and Markus.

Changes since v1:
   - Exposing the MemCharDriver via command line.
   - Support base64 data format suggested by Anthony and Eric.
   - Follow the new rule for the name of qmp command from Eric.


Lei Li (4):
   qemu-char: Add new char backend CirMemCharDriver
   QAPI: Introduce memchar-write QMP command
   QAPI: Introduce memchar-read QMP command
   HMP: Introduce console command

  hmp-commands.hx  |   72 +++++++++++++++++++
  hmp.c            |   99 +++++++++++++++++++++++
  hmp.h            |    3 +
  monitor.c        |   15 ++++
  monitor.h        |    3 +
  qapi-schema.json |   96 +++++++++++++++++++++++++
  qemu-char.c      |  217 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
  qemu-config.c    |    3 +
  qemu-options.hx  |   10 +++
  qmp-commands.hx  |   89 +++++++++++++++++++++
  10 files changed, 607 insertions(+), 0 deletions(-)




--
Lei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]