From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH RFC 1/3] virtio infrastructure Date: Sun, 03 Jun 2007 20:29:00 +1000 Message-ID: <1180866540.17442.74.camel@localhost.localdomain> References: <1180613947.11133.58.camel@localhost.localdomain> <46610E8D.10706@qumranet.com> <1180777836.9228.44.camel@localhost.localdomain> <46625192.5020108@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jimi Xenidis , Stephen Rothwell , Xen Mailing List , "jmk-zzFmDc4TPjtKvsKVC3L/VUEOCMrvLtNR@public.gmane.org" , Herbert Xu , kvm-devel , virtualization , Christian Borntraeger , Suzanne McIntosh , Martin Schwidefsky To: Avi Kivity Return-path: In-Reply-To: <46625192.5020108-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Sun, 2007-06-03 at 08:28 +0300, Avi Kivity wrote: > Sure, 'used' is important (how else do you get the packet size on > receive?) Well, the sender can prepend the length, or for networking just leave Linux to trim packets. It's the trust issue which bugs me. > , I'm just bitching about the linear scan. If you're doing interrupt mitigation on a high-bandwidth device, I think it's optimal. And if you're not, you obviously don't care 8) That said, thousands of descriptors may not be insane... > Well, if you have 256 slots per direction, you will scan 4KB of memory > per interrupt (256 slots x 2 directions x 8 bytes). You may need a > queue length greater than 256 for a high bandwidth interface, if you > want to reduce your interrupt rate, or if your guest is scheduled out > for lengthy periods (say, a millisecond). Hmm... Perhaps I should move the used arrays into the "struct virtio_device" and guarantee that the id (returned by add_*buf) is an index into that. Then we can trivially add a corresponding bit array. This also makes the "id" easier to use from the driver side: if we add a "max_id" field it can size its own arrays if it wants to. Gets rid of the linked-list in the block driver... Thoughts? Rusty. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/