Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1470375imm; Wed, 8 Aug 2018 18:25:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwUKNAGKkxrH2xZbT33wa/KcuRdhEhQEuEV081y9OtN13dxLjHPfldREAcSbZjkqNC3GiOY X-Received: by 2002:a65:6102:: with SMTP id z2-v6mr112268pgu.46.1533777932032; Wed, 08 Aug 2018 18:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533777932; cv=none; d=google.com; s=arc-20160816; b=bApuxZSy25k01Stgogt2JUMKVnuHqDiuf0zabyocVzjmEDzaCjYFfZ6ZRu6hUZkKpw WeINYTKkBmmiVXX+UuE/iBYf4+x3vAawJ9j+3/VJl2XfO+Q+2mppGHsWsmHRZ37vesjZ yC5xHY61PVdhVvjoNOh2aWMgH/61MtXsPvQgYwvAxOPYHFXoxdeFEFmT/YLt13FiDwGN CurL2vTLOl2/83d8ofy/elGShkyBZzC0Vpp5lHtrcax+Otqbz/rhXDE54MRZe9QKQw7B QrWW55lj49LkDIxTBekGURxY5FgBWv/voAZW0yLIFaSyP9IKndCm36U/0vMan0vSDupC g5Mg== 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=ZZg4GrRXVCQFdPGxkd94HUqx6lv7QFogJn6j/7xWplI=; b=bDmp3rhQxcm9mFEvthHlG1+qDSuAHo3DsKAomNj4JyQXS28h1P2OZvSLOrOuvXUVUk xQX1spURl4xW59jYH90y4AyU39dx5KwyDh3EwAG2RGP4PFBZJmUtsFsiLrcmz4hXesSa 29pFmTRKlLRtZiedp/iuqCiHNGg9ueT/KAQQtvMQtDTmoCo+bXfyg/TwfFeKEkE5S/RY 9IQt60QQ7EAcfXByp4/nvU/A6iAEAb9v9yL1McXDtwAelFjCNwjTEit1/PI4yu6gxrku nwUGNlFQIKTpwvKQs0t6M1TJyopr+u0lhftHHHUQS0mNfem5hRBaWBsaMHnvMRKxOs+L uwig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=wRZU2Ix5; 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 s26-v6si4890872pge.339.2018.08.08.18.25.16; Wed, 08 Aug 2018 18:25:31 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=wRZU2Ix5; 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 S1731793AbeHIDqn (ORCPT + 99 others); Wed, 8 Aug 2018 23:46:43 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:47782 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730262AbeHIDqn (ORCPT ); Wed, 8 Aug 2018 23:46:43 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w791OQ2l034236; Thu, 9 Aug 2018 01:24:26 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=ZZg4GrRXVCQFdPGxkd94HUqx6lv7QFogJn6j/7xWplI=; b=wRZU2Ix51PNqmUAdBbB2RqjtD4aV0VIElo1tYgz+cmWA3tcDirSS0oT2V7WMvVJnO/V6 /DhHMuF7CjuZT/jRe+M08btRSd+nvtBnwjcDFMsIz5cKAK4x49MGJseaHVilAXuA/CDw LC22Oc0aE1Y1KQapLYWhHQ1niq0kh40I3foGEZ38GB6f1K4qwPIWCRHC4NStGJ8nlgi1 T/He3B2MUnEiGkQbDOMhd8yiX7pxOGg232M0vdDAK4RxlH6JQ+3SxiDhmcV6u+RlUIGH h9p93Z8rpt6FgTLZtmrC6flaDupfMDNAgfkB/5ecl2TN4gPVeuy0VhhiUNPB4QJ9X82L bA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2kn1nd86w1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Aug 2018 01:24:26 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w791OPNb009542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Aug 2018 01:24:26 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w791OPj5012386; Thu, 9 Aug 2018 01:24:25 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 Aug 2018 18:24:25 -0700 Subject: Re: [PATCH V2] blk-mq: count the hctx as active before allocate tag To: Jens Axboe Cc: tom.leiming@gmail.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1533722212-20327-1-git-send-email-jianchao.w.wang@oracle.com> From: "jianchao.wang" Message-ID: Date: Thu, 9 Aug 2018 09:24:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8979 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=719 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808090014 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens On 08/08/2018 10:40 PM, Jens Axboe wrote: > On 8/8/18 3:56 AM, Jianchao Wang wrote: >> Currently, we count the hctx as active after allocate driver tag >> successfully. The other shared-tags users could exhaust the driver >> tags and starve a non-active and waiting-tag hctx. Count the hctx as >> active before try to allocate driver tag to fix this. > > Patch looks good, but please add some comments along the way. > Yes, I will do that and post the V3. Thanks Jianchao