[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/15] scsi: move request lists to QTAILQ.

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 03/15] scsi: move request lists to QTAILQ.
Date: Tue, 17 Nov 2009 13:39:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 11/17/09 12:59, Paul Brook wrote:
On Tuesday 17 November 2009, Gerd Hoffmann wrote:
  * Move from open-coded lists to QTAILQ macros.
  * Move the struct elements to the common data structures
    (SCSIDevice + SCSIRequest).
  * Fix request cleanup in the destroy callback.

This feels like the abstraction boundaries wrong. If the request chain fields
are in common structures then I'd also expect the allocation and linking code
to be common.

Isn't that easy because scsi-disk and scsi-generic keep a pool of unused request structures. I didn't change that for now, although I've considered dropping it. Not sure how important it is these days, malloc implementations don't do slow+stupid list walks any more ...

When the pools are gone we can easily move scsi_remove_request() to common code and have the common scsi_req_init() function handle allocation and linking too (and probably name it 'alloc' or 'get').


reply via email to

[Prev in Thread] Current Thread [Next in Thread]