|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [RFC 10/12] Add qemu_put_buffer_no_copy |
Date: | Thu, 21 Mar 2013 10:25:12 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 21/03/2013 10:09, Orit Wasserman ha scritto: > + f->iov[f->iovcnt].iov_base = (uint8_t *)buf; > + f->iov[f->iovcnt++].iov_len = size; > + > + f->is_write = 1; > + f->bytes_xfer += size; > + > + if (f->buf_index >= IO_BUF_SIZE || f->iovcnt >= MAX_IOV_SIZE) { > + qemu_fflush(f); > } It should not be complex to check if f->iov[f->iovcnt - 1] can be extended? This could remove many system calls when you have many consecutive zero pages. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |