Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4835860imu; Mon, 12 Nov 2018 18:42:35 -0800 (PST) X-Google-Smtp-Source: AJdET5eLRO/ZuRNwMUM0c2M+L6yF/+snZ2GQBctl2G00D9WCY4R9rYcbuj/SXsIaCpQufs74q9O5 X-Received: by 2002:a63:314c:: with SMTP id x73mr3135699pgx.323.1542076955070; Mon, 12 Nov 2018 18:42:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542076955; cv=none; d=google.com; s=arc-20160816; b=ajjj9+sQaiWwNEf0fpu3cCKC2fifyKF1FDUCzKgbS+/fGtUhFn7SZrqyWdXaZOisPV ySCTSemql95SaRMR+Zy24nnc1QkOQ/tvaYClBN/Bz5dhRvuOYdPSuqKXVQTAUsTtp1HA 1Utf0fCZi2ESaiqJhkFPpKptydz1lUCDo4AeunVALRPKfwjLnW2aGP/jvbL9E9825jIB TqL99116NfWL7P7crW4wOoLJK1ncRNH9MFPkAiHXApLxBfmNe5PBRavH0FIeNR4Fdi8E DwSODJq/+rQcZcc/1bHfuzSLwMVMcEnlTfTa5iFlifx84XHhHgpZqXeHZDsHbSBcW6lU 4t2A== 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; bh=I/FKXjdl2oSkJpZZQHHJ4BWXMm4ulfFsEiyU0ClqHf0=; b=aLGc/QRkSzNzOSDslYyR0S69ZliZD8i1Uurr+BEoE9qiCb15OqB35b9rzZmMzSboY4 hwXqi7sK5hZTcv4fj/5gLJI3tntIYOS+wpXfYU1vhXAd1GzdX7peOb3scDlZmsRondQi hfU8I5KKX0RiuaZhg8ZzxAuPG9Glwj13X9vRkj4QoJVtYb9ecdrRHYiBYaxogvr1BQle px7N79ivy/o8sLrqFvoOn0TrY8oeMhLaH9UOV9K1alV2VGvig1o1HsC8PSfxJyw9kgod 6PR+0nWVGetY7vyKBNfuQdQ3bYUrJaPBiFJV0mLZL4/IUMIxtIRzqvLd07cLIsfbG4Xj 9ngg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=KYLvovaj; 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 bi6si2399290plb.279.2018.11.12.18.42.04; Mon, 12 Nov 2018 18:42:35 -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-2018-07-02 header.b=KYLvovaj; 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 S1730411AbeKMMhc (ORCPT + 99 others); Tue, 13 Nov 2018 07:37:32 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:56868 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbeKMMhb (ORCPT ); Tue, 13 Nov 2018 07:37:31 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAD2YWWb084146; Tue, 13 Nov 2018 02:41:29 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-2018-07-02; bh=I/FKXjdl2oSkJpZZQHHJ4BWXMm4ulfFsEiyU0ClqHf0=; b=KYLvovaj/n11O+cisyiHUQOfJKKmkTXGL9xBqa45PWc4KwM7hZpQ9Lh7LLCBePHOrKXq PAEB8ZIwD2RAVtOOvZWMwhdv2quCFNDQqNjVBuYo+xrx9TCWDpVp9sKvyFm7HI9fF3QY GMnVPJcEILZ9y/H/ixbIUCwvQzRYwbmbI9GrxqTpun78vPgJg57I67JNC4rZGcfBdNDq g3hvtUwtLg226g5il2SOS95mfu1yjT/DIhJU8Bk8nw1OGfMSY//Inzx8cuzgfgFRsNj2 JQAj+fLZ0X5m/o7TsIbxJ1hKAt0oztbLYV1e6FDeqyMKloYse6IWyP33+lg3sKCMfVfE 4w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2nnwg17tar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 02:41:29 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAD2fSlg010897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Nov 2018 02:41:28 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAD2fSgX002615; Tue, 13 Nov 2018 02:41:28 GMT Received: from [10.182.69.118] (/10.182.69.118) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Nov 2018 18:41:27 -0800 Subject: Re: [PATCH V5 1/6] blk-mq: make __blk_mq_issue_directly be able to accept NULL cookie pointer To: Jens Axboe Cc: ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1542014609-1769-1-git-send-email-jianchao.w.wang@oracle.com> <1542014609-1769-2-git-send-email-jianchao.w.wang@oracle.com> <01bd2f70-cc78-9bfd-aa30-b73c44eaa9bb@kernel.dk> From: "jianchao.wang" Message-ID: <87aa2951-54ce-e979-790f-8f1c18d78f14@oracle.com> Date: Tue, 13 Nov 2018 10:41:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <01bd2f70-cc78-9bfd-aa30-b73c44eaa9bb@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9075 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=872 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130022 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens On 11/13/18 1:10 AM, Jens Axboe wrote: > On 11/12/18 2:23 AM, Jianchao Wang wrote: >> Make __blk_mq_issue_directly be able to accept a NULL cookie pointer >> and remove the dummy unused_cookie in blk_mq_request_issue_directly. > > What's the reasoning behind this? Seems faster to store the cookie > always, instead of introducing a branch to the hot path. > It is to make the interface more usable then we needn't input a dummy cookie pointer but just a NULL if we don't use the return cookie. If the introduced branch in hot path is concerned, I could drop this one. Thanks Jianchao