Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1718972imm; Thu, 16 Aug 2018 01:08:28 -0700 (PDT) X-Google-Smtp-Source: AA+uWPww2ycf1W60eW6pFFsRrge5WbjmQuD1UbeoR4mkEEFsKV2AarnZjIxKQwy3CKiDhtG1Tl7l X-Received: by 2002:a63:6949:: with SMTP id e70-v6mr28960611pgc.119.1534406908674; Thu, 16 Aug 2018 01:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534406908; cv=none; d=google.com; s=arc-20160816; b=m/AyEVhYfePkMcrzGeUdSI2cgrhKr+AjDVSdj/WcAA9YpEh649W2Md7hJwTazWfYRM v2x5VlS+KBOq8i7iqyg68BWpcLAgt0h4jdPbe9+p0Q076iyohLBzSNB7RdbRGV7+405Y +Xqse2V5RmNyM+O22b+9I9ajsuAdINIu82b62Dc0h7RkQYdA70N9K+0F2CYVgvQBGFEq kKoOHI9TP0tWOP34oFrRVhENU679xcfSP5ByxDomnWE/+Tz9CyG282vuxz/JMFoa6or/ ogE3jVftXcArWJGs+mNJUumn6G9hRscFZj7lhd12Mt4GiIiW/05ttVgWQ01dp+7Ngw0C 9v7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pQ/Z/MuwrkKCNz9q93ZamWHUPOLAStzv64ttRQOV0IU=; b=Dcdp1U4fFqpH4qocv97ehcl84AOetNFPgj9SM7HZLRyBS5sKhp86gJFkbWxDQqP4kF bcO2ZZjUc7srUoTbgb9DfYR/djym8iMDGFSjw9bPQ7uYm+fg/CUNxlX5bMbxkMgl7wqj 0hkjV0N+9JIBEwxeUChrE97lNuftGzkl/1/jmA9O48vlGzUS3IiFuyWfSok5tDBWEeDU 5w53K7Ay2yw5xHzU9Ezx8dtT/Tln0bvMty+67Hgrc+9Qp8MY76d9mxaTDedbVLOFgjvo P6Mda9q7vz+usDZCByhXD67F/VYAfEga9VR6ZuC+HN+wStbExgbsh5VlPnXe7lCVEL0m l5RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GbZbvzsZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30-v6si24548669pgk.253.2018.08.16.01.08.13; Thu, 16 Aug 2018 01:08:28 -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=@gmail.com header.s=20161025 header.b=GbZbvzsZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731143AbeHPHqO (ORCPT + 99 others); Thu, 16 Aug 2018 03:46:14 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40276 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbeHPHqN (ORCPT ); Thu, 16 Aug 2018 03:46:13 -0400 Received: by mail-wr1-f65.google.com with SMTP id h15-v6so2894821wrs.7; Wed, 15 Aug 2018 21:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pQ/Z/MuwrkKCNz9q93ZamWHUPOLAStzv64ttRQOV0IU=; b=GbZbvzsZLK+yPvwhTE2n6wkvtnI6+SqRYSyY8uC0W4ukixwmMyx3bKKb6NM/oKr5dZ CbDO+QUBZefA7P/DQAj4ttxOPtOxgREtwFWYuUnzmWowLjZkXWs4/F1f4R3w5w7+y86T f+19rEIzjywZQM7sEgHb5am1prpGsEPh6X6s0SvXofrm/NXJeXtFXGGBPHlMQfj47gxp HrEY34WB7/P0G0S8GP+p6GFjBJUZHsw6/jdLqKH9FEpb2CGS93k0UjvkHf5dGOvVadO0 zBdxv4AmbphQ6uLpVV4wm0yIYDBPQa1gtPmkNvRUtcUdNyjj6se8ZKkOV8cfL/WWj+KW cwcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pQ/Z/MuwrkKCNz9q93ZamWHUPOLAStzv64ttRQOV0IU=; b=r9V+ejQHHw5+dtll9uRdmANBtTy/NA20svBiJgT/E2Ny1Lk2QiOiWH93HbpNbODzcr X5/5LbV4amGRaew9/GPUP97eY52YdkZ2EzQyBxmDI+kdtlHYapHslZ273G9OmGz8b52l OPtMwTVHPNiS4NWqbSWbwUhd15J6OVsLnTyEa+08i1ExdAdTW6kqN91RofIAUH2GQH9K zbo5fTUjRnpVvJX9A0zBh83IKpaXjjQNVDEltmbV+4K7+AmRSkYwUXyKYTNZpJE9buvf 7i/cPp5ptJgd8QICRgrUMPwtTWPP818NJ65EN0NyNp+1a410GvBVKenaTvRriDoCbL0f V//A== X-Gm-Message-State: AOUpUlFb06QerAtroXX2PrhAbbN6p8na7JQ5QBAKsh3v8e+GL2LzqiEr 1cA8R6zz400Qw59ac1PsM1dqTysbNZIGl0clkUmDpxil X-Received: by 2002:adf:e841:: with SMTP id d1-v6mr12328177wrn.269.1534395031995; Wed, 15 Aug 2018 21:50:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:32c1:0:0:0:0:0 with HTTP; Wed, 15 Aug 2018 21:50:31 -0700 (PDT) In-Reply-To: <1534317915-5041-3-git-send-email-jianchao.w.wang@oracle.com> References: <1534317915-5041-1-git-send-email-jianchao.w.wang@oracle.com> <1534317915-5041-3-git-send-email-jianchao.w.wang@oracle.com> From: Ming Lei Date: Thu, 16 Aug 2018 12:50:31 +0800 Message-ID: Subject: Re: [PATCH 2/2] blk-mq: sync the update nr_hw_queues with part_in_flight To: Jianchao Wang Cc: Jens Axboe , Bart Van Assche , Keith Busch , linux-block , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 15, 2018 at 3:25 PM, Jianchao Wang wrote: > For blk-mq, part_in_flight/rw will invoke blk_mq_in_flight/rw to > account the inflight requests. It will access the queue_hw_ctx and > nr_hw_queues w/o any protection. When updating nr_hw_queues and > blk_mq_in_flight/rw occur concurrently, panic comes up. When updating nr_hw_queues, all queues are frozen, and there shouldn't be any inflight requests, so there shouldn't be such issue. Thanks, Ming Lei