Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7018438imm; Wed, 27 Jun 2018 18:20:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLAtrmFQMI3opRFARWMKI+mPZvR9GhvVG0bS3TDAYfZbOkhQU+uKYnIVOpedSVZ6CP+pFk4 X-Received: by 2002:a17:902:6193:: with SMTP id u19-v6mr8261062plj.133.1530148802246; Wed, 27 Jun 2018 18:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530148802; cv=none; d=google.com; s=arc-20160816; b=E22pGAz1LmLQ4qq3SriG+2/vJvixXphJV9jt/BUTtepo9kcEqkHdUsfFFOi6fmjCqS PQxQeucxDMCgJhSvt39oXPe40AA5hHQqfe9pNJM+UA9ehWKCK2QVkHIlVh7HrqM4I6UO 5qjBKH8GrFWugcBNLoPrF4QoKUOU3vz4eklKO+3U/zwqnTBRDUEtYNYHG/c00XtbieBG 6AifvujrU+uYiVJIEbzhMHdjUv1N/a4sQSOip2ETUG3pQACGyhlBF7OOSDrPkeS6GcnI 8D/bU2jgciKjdadHks3fnhgb11r/UV1eiEfRH5/DV3GoDcSXX52P7p8U9E+nG1cKk1nL 4SZg== 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=agUdtiM8g9jNj8WgZ91GjY9HwPzHViEQzBbk2t5+Lh0=; b=w86tMFz/1VsbuB/zT7oSS7YuItxC46exSKZ95AreMZ8JB8wAG+PLirXFNIvmwr9eNl HKN471bACjl52kVbVwgSfr/B2jxRxcrxWoZ/bKIQ9c5UftgFz2iywTJ17VO0Tk12Ln2L /nqRst7+ho11qaQQUtSEMTgXIiBNIt95sqKnwn5V0fqRXZLQL6I0FOidfZNgqbNZQw31 cFzdaR8fQOKlpFcwbstbVeVzF/WQ20LFnB+kzeVuzWKChVNoZpFFXEEfqD1dSMQHO1Wj 6uGkHAj5v/4R5+Qpgm70NQbUlI7ZUJ2/0jUl3HFRER279/84fUliiIzQin7Y3wi7vCj3 Qqzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=e5KAW29d; 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 d34-v6si5101290pld.252.2018.06.27.18.19.47; Wed, 27 Jun 2018 18:20:02 -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-2017-10-26 header.b=e5KAW29d; 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 S1752332AbeF1BPj (ORCPT + 99 others); Wed, 27 Jun 2018 21:15:39 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:48330 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbeF1BPh (ORCPT ); Wed, 27 Jun 2018 21:15:37 -0400 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 w5S19OaA178422; Thu, 28 Jun 2018 01:15:35 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=agUdtiM8g9jNj8WgZ91GjY9HwPzHViEQzBbk2t5+Lh0=; b=e5KAW29dqqN3rRrLbnayjDM4pOKj6tiK/uuqB1vOPla3wKUuu7+bNKq9XQ06Pn/c6vlU pC6Y9wNdx6oPLjYa+sjQZDBb/7N7Td0REmZYUPWE0fHIZfXZEldpNAHFSHxswCp60HRY 2SIDW1AA51zozH2YyL3UvTBQEJIoTUlO76ZF7h7uEa9nWfTqzAMsccfbldMA5TY5R1AP K6HYo3z75g97DKpowsNYhNquyJus8ixr5P2kZG0WAN14oK5kVZm/qxVhDoySgDhY0Qqh KbA9iqbcZTFrEWwKXTdVB0UtyPpkudEf/E2W1BST/9F8hExziaaq5QWItc+SMbAZaCSb mg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2jum57xyh0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jun 2018 01:15:35 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5S1FZ3K008817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jun 2018 01:15:35 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5S1FYLZ024694; Thu, 28 Jun 2018 01:15:34 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 27 Jun 2018 18:15:34 -0700 Subject: Re: [PATCH] blk-mq: use mutex_trylock to avoid lock inversion To: Bart Van Assche , "axboe@kernel.dk" Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" References: <1529391637-1704-1-git-send-email-jianchao.w.wang@oracle.com> <2409013d789ca266879d24c815b76c2193e23fe3.camel@wdc.com> <2c2003ff1baac05688495677f67239d52f6d9527.camel@wdc.com> <2a1dda06-5c7c-b75b-c1ae-75d1a2a49694@oracle.com> <1d4d1dc3-7014-4e2a-1ea5-e1446381b404@wdc.com> <07e9e71a-723c-93a8-becb-df5d2f43b690@oracle.com> From: "jianchao.wang" Message-ID: <9ee9aee0-9361-b2ef-3124-aa6cab678faf@oracle.com> Date: Thu, 28 Jun 2018 09:15:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <07e9e71a-723c-93a8-becb-df5d2f43b690@oracle.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=8937 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=881 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806280010 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/28/2018 09:11 AM, jianchao.wang wrote: > Hi Bart > > On 06/26/2018 11:36 PM, Bart Van Assche wrote: >> On 06/25/18 20:47, jianchao.wang wrote: >>> V2 patch has been posted, would you please take a look at on them ? >>> https://urldefense.proofpoint.com/v2/url?u=https-3A__marc.info_-3Fl-3Dlinux-2Dblock-26m-3D152965143412927-26w-3D2&d=DwICaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=7WdAxUBeiTUTCy8v-7zXyr4qk7sx26ATvfo6QSTvZyQ&m=FPLHVLVF0V8ZCvwZJx7vHy9v01iAQogJ_IbvseGhElo&s=tQ0ZiK7VrV4j-6K_WEfiWAyxogOrC8hOm6coS9nAmYI&e= >> >> Hello Jianchao, >> >> Patches 1/3 and 2/3 of that series look fine to me but I don't like the approach of patch 3/3 so please do not expect a review from me for that patch. >> > > Would you please explain the defects of the patch 3/3 ? We still need some way to serialize the blk_register/unregister_queue, blk_mq_sysfs_register/unregister and sysfs queue, mq, hctx entries' show and store method. So I didn't introduce another mutex as your suggestions. > > Thanks > Jianchao >