virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: quintela@redhat.com, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 3/6] virtio: console: Switch to using a port bitmap for port discovery
Date: Mon, 22 Mar 2010 18:01:53 +0530	[thread overview]
Message-ID: <20100322123153.GK19148@amit-x200.redhat.com> (raw)
In-Reply-To: <20100322121632.GA17287@redhat.com>

On (Mon) Mar 22 2010 [14:16:32], Michael S. Tsirkin wrote:
> > > > I can't certainly predict how many ports might be needed, but I think
> > > > we'll have other ways of communication if we need > 200 ports.
> > > 
> > > If, say, 32 bytes are sufficient, let's just reserve a fixed size
> > > array and everything will be simpler?
> > 
> > Yes, 32 bytes means 256 ports. Should be OK; if not, one could add more
> > such devices and get more ports. But if I have to choose between fixing
> > the number of ports in the config space vs using the control queue for
> > the bitmap, I'll go for the latter. That's assuming we really really
> > don't want to use the config space for storing the bitmap.
> 
> I guess with control queue we also simply use message per port
> state change - would that be simpler than a bitmap?

Yes, that's how hot-unplug is done currently (before this patchset).
I'll cook up a similar version like you suggest for adding ports as
well.

> > > > > > +	port_bit = ffs(*map);
> > > > > > +	port_bit--; /* ffs returns bit location */
> 
> simple u32 port_bit = ffs(*map) - 1; not clear enough?

Well yeah; I'll just open-code it.

		Amit
-- 
http://log.amitshah.net/

  reply	other threads:[~2010-03-22 12:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 12:06 [PATCH 0/6] virtio: console: Fixes, abi update Amit Shah
2010-03-19 12:06 ` [PATCH 1/6] virtio: console: Generate a kobject CHANGE event on adding 'name' attribute Amit Shah
2010-03-19 12:06   ` [PATCH 2/6] virtio: console: Check if port is valid in resize_console Amit Shah
2010-03-19 12:06     ` [PATCH 3/6] virtio: console: Switch to using a port bitmap for port discovery Amit Shah
2010-03-19 12:06       ` [PATCH 4/6] virtio: console: Separate out get_config in a separate function Amit Shah
2010-03-19 12:06         ` [PATCH 5/6] virtio: console: Handle hot-plug/unplug config actions Amit Shah
2010-03-19 12:06           ` [PATCH 6/6] virtio: console: Remove hot-unplug control message Amit Shah
2010-03-21 11:29       ` [PATCH 3/6] virtio: console: Switch to using a port bitmap for port discovery Michael S. Tsirkin
2010-03-22  4:04         ` Amit Shah
2010-03-22  8:53           ` Michael S. Tsirkin
2010-03-22  9:45             ` Amit Shah
2010-03-22 12:16               ` Michael S. Tsirkin
2010-03-22 12:31                 ` Amit Shah [this message]
2010-03-21 11:44 ` [PATCH 0/6] virtio: console: Fixes, abi update Michael S. Tsirkin
2010-03-22 10:44   ` Amit Shah

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=20100322123153.GK19148@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=mst@redhat.com \
    --cc=quintela@redhat.com \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).