From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcemd-0001uZ-RK for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcemc-0002E4-8W for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:33:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcemb-0002E0-Ol for qemu-devel@nongnu.org; Fri, 01 Jul 2011 10:33:26 -0400 Message-ID: <4E0DDAAA.3000505@redhat.com> Date: Fri, 01 Jul 2011 16:33:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1309506172-17762-1-git-send-email-hare@suse.de> <1309506172-17762-2-git-send-email-hare@suse.de> <1309506172-17762-3-git-send-email-hare@suse.de> <4E0D84DF.7030303@redhat.com> <4E0DC765.5090200@suse.de> In-Reply-To: <4E0DC765.5090200@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Alexander Graf , qemu-devel@nongnu.org, kvm@vger.kernel.org, Stefan Haynoczi On 07/01/2011 03:11 PM, Hannes Reinecke wrote: > On 07/01/2011 10:27 AM, Paolo Bonzini wrote: >> On 07/01/2011 09:42 AM, Hannes Reinecke wrote: >>> 'tag' is just an abstraction to identify the command >>> from the driver. So we should make that explicit by >>> replacing 'tag' with a driver-defined pointer 'hba_private'. >>> This saves the lookup for driver handling several commands >>> in parallel. >> >> This makes tracing a bit harder to follow. Perhaps you can keep the >> transport tag (a uint64_t) in the SCSIRequest for debugging purposes? >> > Hmm. The transport tag wouldn't have any meaning outside scsi-bus.c. It depends, in vmw_pvscsi I take it from a field in the request block that is 0..255. So either you have a small tag that is recycled but stays nice, or a large tag that is unwieldy but should not be recycled ever. A pointer is unwieldy _and_ is recycled, so it gives the worse of both worlds. But I'm not very attached to this, I may even do it myself if/when I find the need. Won't ack yet because of the nit with ESP/USB, but even if you do not bother I will ack the next respin. Paolo