Received: by 10.223.185.116 with SMTP id b49csp5664498wrg; Tue, 27 Feb 2018 18:26:14 -0800 (PST) X-Google-Smtp-Source: AH8x225T5Pe+s/CvC7NMnR1qy60/D+Yz0RlzqyOZLOL0Bfo/9vHBcmCHY0zVn+ilx6oLcZ3L8kTc X-Received: by 10.101.86.73 with SMTP id m9mr13119701pgs.70.1519784774224; Tue, 27 Feb 2018 18:26:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519784774; cv=none; d=google.com; s=arc-20160816; b=to4roMu+KeaxHXsGkqhF0sJD0G937+fG5HdnpvVsmT9RUxeZHV8BGSWDXPQOJIBaX2 qo4hNBNVm1BqkrrTX2sI/DQwLjPt2SvmnwSQiV//ZL0rRoN/WiPE2uqu7CP6kErvtpaf WcGP0l3uVMSK4L1941yHLWDbZixfVMhCecGaf14eiQSj9JappwV7aobsfLc5HOeEtfRL IqMZlsBIVMCgLWQwNcvdBk/b5iCx6KfE7/JbXZGdScIRePWD294UNsPuWg/yfwpAXWQh DNqm67r3qe6kI+u0HNZpe9Z+xhD9ETr9u2rRvkoPWE64uOQPCBQ561GvsaM5i0aQpZSg 3wPw== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=uQ0IYZfoMjQ5yH+d5kroEgo8Ujl4BkFMvQ6o5PDTKBU=; b=gNP/yzFC1LBUKEHHEOiCDNO2Ab7JuMjvgGLeaHcad9ketTIzXbDNK+tV7HV3JonbLB G7A5rwCjKWVuZsvwJF/PwYG987F0If6KJJobiUoHTr9CZNaASJgBluhQYKC2glALY9Vd MkKlP2WXzjSOovmgmoLcUSXzaQF9WMfnqpwibWVeGAIR6hUjZjtnHTRVBfCDBtN1QvSy RUk5tlkttrhow+rQBxryjhNsbbLTylyXJhsPR7SKcoR/m3m+7nPzHKejwJYup0RW1igG 5ZzES6T3oYbO9eEeetuDhWDttCrIhVckoO8YFO1cCSugN37FInABt0zc532GCJ00Nqng +4YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fftL2k9K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10-v6si423139ply.373.2018.02.27.18.25.59; Tue, 27 Feb 2018 18:26:14 -0800 (PST) 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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fftL2k9K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751844AbeB1CZU (ORCPT + 99 others); Tue, 27 Feb 2018 21:25:20 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:40026 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbeB1CZS (ORCPT ); Tue, 27 Feb 2018 21:25:18 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1S2LsiG015602; Wed, 28 Feb 2018 02:25:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=uQ0IYZfoMjQ5yH+d5kroEgo8Ujl4BkFMvQ6o5PDTKBU=; b=fftL2k9K4v4tkiU70YOPEMux3AXMx03qOFfMV+T8I9Sgw0V9DijJg3uztHxWHUYOww/G 9YKakQdVLmwjz+4wOymtHq7KpoBQ6ShQ9nKojd0M9XyH71sV/eVCRVFY4T26/A2p/7mC oIzQUkgqpfQo7IrGu0040rH80EhoudsNDPjxCqCOie5L4u0Y0I5f6XmZmlcQe2vzyX2G OUHrKheOjZn3W5bA7yE56BpFfp9wuZlEJr9J2RrWN3b6V6ZGPsKHRQN5X9N+lzMnxiq2 Pli3kfWXy8txgJEHfk/WWokTT35nE8GyHqTdpSt+u47QVjuX0P44OfISBFrYQzTB/2af jQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2gdgj50gqp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Feb 2018 02:25:14 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1S2PDvs030195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 28 Feb 2018 02:25:13 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1S2PDKT016481; Wed, 28 Feb 2018 02:25:13 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 27 Feb 2018 18:25:13 -0800 Subject: Re: [PATCH] scsi: core: use blk_mq_requeue_request in __scsi_queue_insert To: Bart Van Assche , "jejb@linux.vnet.ibm.com" , "martin.petersen@oracle.com" Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "hch@lst.de" References: <1519631932-1730-1-git-send-email-jianchao.w.wang@oracle.com> <1519700898.3120.3.camel@wdc.com> <3b6ca136-ba62-3eca-6eca-d191490b7754@oracle.com> <1519702875.3120.7.camel@wdc.com> <1519708355.3120.9.camel@wdc.com> <478f40f1-d86c-ee5f-daaf-6332b67fe721@oracle.com> <1519751213.23791.3.camel@wdc.com> <1519751913.23791.6.camel@wdc.com> From: "jianchao.wang" Message-ID: <449a5591-252d-e1f9-967b-d9c530f1f788@oracle.com> Date: Wed, 28 Feb 2018 10:25:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519751913.23791.6.camel@wdc.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8817 signatures=668681 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=816 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802280027 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bart Thanks for your kindly response and precious time to review this. On 02/28/2018 01:18 AM, Bart Van Assche wrote: > On Tue, 2018-02-27 at 17:06 +0000, Bart Van Assche wrote: >> On Tue, 2018-02-27 at 13:15 +0800, jianchao.wang wrote: >>> Can you share more details about this ? >> >> After having had another look, I think your patch is fine. > > (replying to my own e-mail) > > What I think is fine in your patch is that it skips the unprep and reprep > when requeueing. However, there is a put_device(&sdev->sdev_gendev) call > in scsi_mq_requeue_cmd() and your patch causes that put_device() call to > be skipped when requeueing. An explanation is needed in the commit message > why you think that removing that put_device() call is fine. Your concern is right. For the block legacy path in scsi core, the get_device(&sdev->sdev_gendev) is in prep. So when it requeue the request w/ RQF_DONTPREP, the reference will not be got again. However, for blk-mq patch in scsi core, the get_device(&sdev->sdev_gendev) in .get_budget, so put_device is still needed here. Thanks for your directive. Jianchao