From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH RFC] Advertise IDE physical block size as 4K Date: Mon, 4 Jan 2010 09:36:48 +0100 Message-ID: <20100104083648.GB7660@lst.de> References: <1262081278-1858-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from verein.lst.de ([213.95.11.210]:57095 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146Ab0ADIhI (ORCPT ); Mon, 4 Jan 2010 03:37:08 -0500 Content-Disposition: inline In-Reply-To: <1262081278-1858-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 29, 2009 at 12:07:58PM +0200, Avi Kivity wrote: > Guests use this number as a hint for alignment and I/O request sizes. Given > that modern disks have 4K block sizes, and cached file-backed images also > have 4K block sizes, this hint can improve guest performance. > > We probably need to make this configurable depending on machine type. It > should be the default for -M 0.13 only as it can affect guest code paths. The information is correct per the ATA spec, but: (a) as mentioned above it should not be used for old machine types (b) we need to sort out passing through the first block alignment bits that are also in IDENTIFY word 106 if using a raw block device underneat (b) probably need to adjust the physical blocks size depending on the underlying storage topology. I have a patch in my queue for a while now dealing with (b) and parts of (c), but it's been preempted by more urgent work.