From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfuzK-000725-Q0 for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:42:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfuzE-00071J-LY for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:42:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfuzE-000716-02 for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:42:04 -0400 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfuzD-0006gv-EW for qemu-devel@nongnu.org; Sun, 30 Mar 2008 06:42:03 -0400 Message-ID: <47EF6E79.8010406@qumranet.com> Date: Sun, 30 Mar 2008 13:42:01 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Improve DMA transfers by increasing the buffer size. References: <18410.31540.160387.110544@mariner.uk.xensource.com> <20080327235340.GA7964@volta.aurel32.net> <18412.55320.507537.335497@mariner.uk.xensource.com> In-Reply-To: <18412.55320.507537.335497@mariner.uk.xensource.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Ian Jackson wrote: > Aurelien Jarno writes ("Re: [Qemu-devel] [PATCH] Improve DMA transfers by increasing the buffer size."): > >> On Wed, Mar 26, 2008 at 04:35:00PM +0000, Ian Jackson wrote: >> Content-Description: message body text >> >>> +#define IDE_DMA_BUF_SIZE 131072 >>> >> Wouldn't it be better to define this value in number of sectors? This >> would avoid a few divisions in the code, and anyway the code handling >> DMA transfers is working with a number of sectors, not a number of >> bytes. >> > > I don't have much of an opinion about what units it should be in. The > divisions are just at compile-time of course. > > I prefer bytes myself, this way it is easy to have all constants using the same scale factor (1) and avoid worrying about conversions, except at the last moment when using them. -- error compiling committee.c: too many arguments to function