All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Molton <ian.molton@collabora.co.uk>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paul Brook <paul@codesourcery.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG
Date: Fri, 23 Apr 2010 16:49:24 +0100	[thread overview]
Message-ID: <4BD1C184.9030300@collabora.co.uk> (raw)
In-Reply-To: <4BD1A998.2020500@redhat.com>

On 23/04/10 15:07, Gerd Hoffmann wrote:

>>> In my usage of qemu I didn't came across a use case which needs qemu
>>> reconnecting yet.
>>
>> You're comparing apples with oranges :-)
>
> IMHO I don't.

Well, comparing a connection where qemu is the server to one where it is 
the client doesn't seem terribly valid to me...

>> That example is the opposite of whats happening in my case - qemu must
>> act as a client in order to connect to an EGD daemon.
>
> Sure. If I have the choice I usually pick qemu taking the server role.
> For the egd case there is no choice, qemu has to be the client. Which
> makes egd a special case, so we could handle the special needs in the
> egd bits.

I really don't think its that unusual...

> You can configure any chardev to be a tcp client. I never do that though
> as I find it much more convenient to configure it as server.

Perhaps thats because chardev clients are nearly useless right now 
because they just die if the connection drops...

> Lets step back.
>
> We want: Allow linking the egd entropy data stream to any device
> virtio-rng, isa-serial, virtio-serial, whatelse. Which means the
> reconnect and rate limit logic should *not* sit in virtio-rng but in the
> chardev feeding the device.
>
> Agree?

Yes.

> Ok, now for the chardev we have basically two choices:
>
> (1) Create a special egd chardev backend which handles reconnects and
> rate limiting automatically.
> (2) Add options for reconnect and rate limiting to the socket chardev
> backend.

Ok.

> For (1) you can (at least initially) simply hardcode sensible rates and
> reconnect retry times for egd needs. I suspect it is the easier road for
> you.

But the chardev layer wont reconnect for you.

Or are you suggesting that we create another type of chardev, thats 
nearly like a socket, but speaks egd and can reconnect? That seems 
hideous to me.

> With (2) the reconnect/rate limit bits are reusable for other use cases.
> Which is nice indeed. But designing the config options part will become
> a bit more tricky then, because you can't ignore possible other use
> cases then ...

But (2) is already done. Ok, the options might be 'simplistic' right 
now, but whats to say we cant add more (like "burst=foo" or something) 
should the need arise?

seriously, I had thought when you suggested it earlier that a chardev 
backend was the right way, but now I see that a backend to handle egd 
would also have to handle connecting etc. and thats just wrong. What we 
need ideally is something like a line discipline that talks egd.

That way it wouldn't matter if it were a socket or anything else that 
the data came in via, which is the case with the patch as I wrote it - 
you can feed in EGD from a file, a socket, anything, and it just works.

Rolling the EGD, reconnects, connection handling etc. all into a special 
backend would lose us that functionality, so I'm against that.

Have you actually tried the code out? It works very naturally, reuses as 
much built in qemu functionality as it can, and has a nice commandline 
syntax I think. What advantage is there in breaking that?

-Ian

  reply	other threads:[~2010-04-23 15:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 14:05 [Qemu-devel] [PATCH 0/2] VirtIO RNG Ian Molton
2010-03-30 14:12 ` [Qemu-devel] [PATCH 1/2] " Ian Molton
2010-03-30 14:13 ` [Qemu-devel] [PATCH 2/2] " Ian Molton
2010-04-01 12:17   ` Paul Brook
2010-04-01 12:30     ` Jamie Lokier
2010-04-01 14:03       ` Paul Brook
2010-04-02 10:13         ` Ian Molton
2010-04-03 15:06           ` Paul Brook
2010-04-13 14:41             ` Ian Molton
2010-04-13 15:01               ` Paul Brook
2010-04-13 15:32               ` Paul Brook
2010-04-20 15:15                 ` Ian Molton
2010-04-20 16:13                   ` Jamie Lokier
2010-04-20 19:52                     ` Ian Molton
2010-04-20 20:11                       ` Blue Swirl
2010-04-20 20:56                       ` Jamie Lokier
2010-04-20 21:31                         ` Ian Molton
2010-04-20 21:55                           ` Jamie Lokier
2010-04-21  7:43                           ` Gerd Hoffmann
2010-04-21  9:40                             ` Jamie Lokier
2010-04-21 12:34                               ` Ian Molton
2010-04-21 13:55                                 ` Gerd Hoffmann
2010-04-22 19:06                                   ` Ian Molton
2010-04-22 21:05                                     ` Jamie Lokier
2010-04-23 10:17                                       ` Ian Molton
2010-04-24  1:37                                         ` Jamie Lokier
2010-04-24  8:58                                           ` Ian Molton
2010-04-23  8:27                                     ` Gerd Hoffmann
2010-04-23  9:28                                       ` Ian Molton
2010-04-23 14:07                                         ` Gerd Hoffmann
2010-04-23 15:49                                           ` Ian Molton [this message]
2010-04-23 17:32                                             ` Jamie Lokier
2010-04-24  9:16                                               ` Ian Molton
2010-04-02 10:15       ` Ian Molton
2010-04-02 10:07     ` Ian Molton
2010-05-03 17:56   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD1C184.9030300@collabora.co.uk \
    --to=ian.molton@collabora.co.uk \
    --cc=kraxel@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.