From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer Date: Fri, 01 Jul 2011 16:33:14 +0200 Message-ID: <4E0DDAAA.3000505@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, Stefan Haynoczi , kvm@vger.kernel.org, Alexander Graf To: Hannes Reinecke Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60127 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756669Ab1GAOd2 (ORCPT ); Fri, 1 Jul 2011 10:33:28 -0400 In-Reply-To: <4E0DC765.5090200@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: 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