Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2173573ybi; Thu, 4 Jul 2019 06:20:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzt9/59vRHHGqW/ws1u9/ytIKTykbVbbn9thyZUb0oocL/R3MNmsge4vfSCDPHY++8m/E6d X-Received: by 2002:a17:90a:2023:: with SMTP id n32mr18909628pjc.3.1562246420769; Thu, 04 Jul 2019 06:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562246420; cv=none; d=google.com; s=arc-20160816; b=mv7FOHBQW9LWx8yhQOVIv+ZE2kQL707KWTZnWUZMAGLp0r9ujHBAVd0tYfKfL5Y+wN XW9zeWob2Nl5D5UlMKemDWhxfoLHLSj5Ycwad3tuBMiS58sUp3Lw/zmbcZ51tvqDMd7i e0iWnVrs0c5ADrFl+VkOkt6IrEKKfFGHkR23cUqo7qTHAvkJn7FczqjXoKU2HBm8ldNI 78LULVe3TPun14pkdypzfXwmidndAiWfsYqNMofOnPkvrzpL7tIEzn22VrL1dliG37C2 +T2bGfJfBdpT0fwTvAHQy6BhcTlR5zHf9g4DZcmqfkzG+c6XrYCV6JC2xV2aUBt7pHJF B+cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=cb7K86i4xSjnh5aO2/GCpQl2NYXJ9GZdRLXhfhoypnU=; b=SYQyu00ccHIeY4IrWnIIA7YVmIhRF488pdY1zPS57IEWPfB81Bspc5WP/BMVqTT/1w QcvsLj374nLdn5fl+RsxzyKcAEN8obBO/Uub7ayXcDK2+vm1+hUIHyhQUD3yKnQ7d4v+ T/W+OHiuoz4D8Ppob0halKBacMsx8eLPzD8Bj1J9rMiWrzHgvMb1OdDcSlI2iLIKGuTZ KjAZ3Xh0fJKOOiaQSMEEqDjoCYIURU9TxcuvuVVnMITNKeIMTTTWsPeGMn81+Odvz4H3 5Qpgm9IIWMfaDWTO7Y5Dai/VJ96IG1WOBgcUluA2FbyzsYPgvf6hSp31ltKu22B6atGu 6vbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g132si5286948pgc.259.2019.07.04.06.20.04; Thu, 04 Jul 2019 06:20:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbfGDNTO (ORCPT + 99 others); Thu, 4 Jul 2019 09:19:14 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37959 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727118AbfGDNTM (ORCPT ); Thu, 4 Jul 2019 09:19:12 -0400 Received: by mail-wr1-f66.google.com with SMTP id p11so1119641wro.5 for ; Thu, 04 Jul 2019 06:19:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cb7K86i4xSjnh5aO2/GCpQl2NYXJ9GZdRLXhfhoypnU=; b=Dz9L2VuCqmjqk1YJZ+RTEMqaGcbPbHk0ybkVLDgwRWVeqnYrCyEg2ssLq6pPpOuxsc L8D8W8AX3wtRiyzpSukqrYrxzXUgzdx6dkuW/4wd+GDX9OgoKZAMhbtgTngX+qP1t7fb 8xCmKFSA13HVt2A8ZUEQ4yn7NOfEttkZFSGNsHrxjQQUlM0ttjYYOy0NrMIc2U908rSO ynF6oVgKY4uVrfEFIKh74iINb/LwYsWBlWP9MhV56Y29zTPm1is+2aaKq2d1k5Z2rpNh HruWnvqnPSb8P5K8LsUhlHR2TGwn9APchYa5DzaW7ingsEjYoo3q1nSUg0fNl66L/dB8 tKgg== X-Gm-Message-State: APjAAAXTCAv+0wA+tQC6h0i3ktc6fhy2BBCwOqI646CBUR4RzgexPiKQ 13xI9YNo9/jJ8C0b5/ijO/iSRQ== X-Received: by 2002:a5d:6190:: with SMTP id j16mr35368415wru.49.1562246350384; Thu, 04 Jul 2019 06:19:10 -0700 (PDT) Received: from [10.201.49.68] (nat-pool-mxp-u.redhat.com. [149.6.153.187]) by smtp.gmail.com with ESMTPSA id l13sm121009wrt.16.2019.07.04.06.19.09 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 06:19:09 -0700 (PDT) Subject: Re: [PATCH 1/2] scsi_host: add support for request batching From: Paolo Bonzini To: Hannes Reinecke , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, stefanha@redhat.com References: <20190530112811.3066-1-pbonzini@redhat.com> <20190530112811.3066-2-pbonzini@redhat.com> <760164a0-589d-d9fa-fb63-79b5e0899c00@suse.de> Message-ID: Date: Thu, 4 Jul 2019 15:19:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/06/19 12:31, Paolo Bonzini wrote: >> I'm a bit unsure if 'bd->last' is always set; it's quite obvious that >> it's present if set, but what about requests with 'bd->last == false' ? >> Is there a guarantee that they will _always_ be followed with a request >> with bd->last == true? >> And if so, is there a guarantee that this request is part of the same batch? > It's complicated. A request with bd->last == false _will_ always be > followed by a request with bd->last == true in the same batch. However, > due to e.g. errors it may be possible that the last request is not sent. > In that case, the block layer sends commit_rqs, as documented in the > comment above, to flush the requests that have been sent already. > > So, a driver that obeys bd->last (or SCMD_LAST) but does not implement > commit_rqs is bound to have bugs, which is why this patch was not split > further. > > Makes sense? Hannes, can you provide your Reviewed-by? Thanks, Paolo