From: Ryan Harper <ryanh@us.ibm.com>
To: aliguori@linux.ibm.com
Cc: Anthony Liguori <aliguori@us.ibm.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org,
Ryan Harper <ryanh@us.ibm.com>,
Paul Brook <paul@codesourcery.com>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] Reallocate dma buffers in read/write path if needed
Date: Sat, 4 Oct 2008 16:47:00 -0500 [thread overview]
Message-ID: <20081004214700.GH31395@us.ibm.com> (raw)
In-Reply-To: <20081004135749.pphehrhuw9w4gwsc@imap.linux.ibm.com>
* aliguori@linux.ibm.com <aliguori@linux.ibm.com> [2008-10-04 12:58]:
> Quoting Avi Kivity <avi@redhat.com>:
>
> >Anthony Liguori wrote:
> >>In general, I don't think there's a correct size to bound them
> >>that's less than phys_ram_size. The guest may be issuing really
> >>big IO requests.
> >
> >The correct fix is not to buffer at all but use scatter-gather. Until
> >this is done buffering has to be bounded.
>
> Instead of capping each request at a certain relatively small size and
> capping the number of requests, I think if we had a cap that was the
> total amount of outstanding IO, that would give us good performance
> while not allowing the guest to do anything crazy.
>
> For instance, a 4MB pool would allow decent sized requests without
> letting the guest allocate an absurd amount of memory.
I'd rather avoid any additional accounting overhead of a pool. If 4MB
is a reasonable limit, lets make that the new max. I can do some
testing to see where we drop off on performance improvements. We'd
have a default buffer size (smaller than the previous 64, and now 128k
buf size) that is used when we allocate scsi requests; scanning through
send_command() provides a good idea of other scsi command buf usage; and
on reads and writes, keep the capping logic we've had all along, but
bump the max size up to something like 4MB -- or whatever tests results
show as being ideal.
In all, it seems silly to worry about this sort of thing since the
entire process could be contained with process ulimits if this is really
a concern. Are we any more concerned that by splitting the requests
into many smaller requests that we're wasting cpu, pegging the
processor to 100% in some cases?
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
ryanh@us.ibm.com
next prev parent reply other threads:[~2008-10-04 21:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 22:05 [Qemu-devel] [PATCH 0/4] Improve emulated scsi write performance Ryan Harper
2008-10-03 22:05 ` [Qemu-devel] [PATCH 1/4] lsi_queue_command: add dma direction parameter Ryan Harper
2008-10-03 22:05 ` [Qemu-devel] [PATCH 2/4] Refactor lsi_do_command to queue read and write ops Ryan Harper
2008-10-03 22:05 ` [Qemu-devel] [PATCH 3/4] Refactor scsi-disk layer for queue'ing writes Ryan Harper
2008-10-03 22:05 ` [Qemu-devel] [PATCH 4/4] Reallocate dma buffers in read/write path if needed Ryan Harper
2008-10-03 23:17 ` Paul Brook
2008-10-03 23:35 ` Anthony Liguori
2008-10-04 0:00 ` Paul Brook
2008-10-04 10:00 ` Avi Kivity
[not found] ` <20081004135749.pphehrhuw9w4gwsc@imap.linux.ibm.com>
2008-10-04 21:47 ` Ryan Harper [this message]
2008-10-04 22:22 ` Anthony Liguori
2008-10-05 5:23 ` Avi Kivity
2008-10-05 23:06 ` Ryan Harper
2008-10-06 7:27 ` Avi Kivity
2008-10-04 23:00 ` Paul Brook
2008-10-05 5:29 ` Avi Kivity
2008-10-05 23:08 ` [Qemu-devel] [PATCH 0/4] Improve emulated scsi write performance Ryan Harper
2008-10-13 16:15 ` Ryan Harper
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=20081004214700.GH31395@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=aliguori@linux.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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 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).