From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] Segments can span multiple clusters with tap:qcow Date: Thu, 26 Apr 2007 10:09:10 +0100 Message-ID: References: <1177533679.28121.5.camel@blaa> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1177533679.28121.5.camel@blaa> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark McLoughlin , xen-devel List-Id: xen-devel@lists.xenproject.org On 25/4/07 21:41, "Mark McLoughlin" wrote: > In blktap's qcow we need split up read/write requests if the requests > span multiple clusters. However, with our MAX_AIO_REQUESTS define we > assume that there is only ever a single aio request per tapdisk request > and under heavy i/o we can run out of room causing us to cancel > requests. > > The attached patch dynamically allocates (based on cluster_bits) the > various io request queues the driver maintains. The current code allocates aio-request info for every segment in a request ring (MAX_AIO_REQUESTS == BLK_RING_SIZE * MAX_SEGMENTS_PER_REQUEST). This patch seems to take into account that each segment (part-of-page) can itself be split into clusters, hence the page_size/cluster_size calculation, but shouldn't this be multiplied by the existing MAX_AIO_REQUESTS? Otherwise you provide only enough aio requests for one segment at a time, rather than a request ring's worth of segments? -- Keir