From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753920AbcBHPBf (ORCPT ); Mon, 8 Feb 2016 10:01:35 -0500 Received: from mga11.intel.com ([192.55.52.93]:4191 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637AbcBHPBe (ORCPT ); Mon, 8 Feb 2016 10:01:34 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,416,1449561600"; d="scan'208";a="910868974" Date: Mon, 8 Feb 2016 15:01:33 +0000 From: Keith Busch To: Wenbo Wang Cc: Jens Axboe , Wenbo Wang , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "Wenwei.Tao" Subject: Re: [PATCH] NVMe: do not touch sq door bell if nvmeq has been suspended Message-ID: <20160208150132.GA25111@localhost.localdomain> References: <1454341324-21273-1-git-send-email-mail_weber_wang@163.com> <56AF8DB5.70206@fb.com> <20160203144123.GB23910@localhost.localdomain> <20160203163808.GC23910@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 06, 2016 at 02:32:24PM +0000, Wenbo Wang wrote: > Keith, > > Is the following solution OK? > synchronize_rcu guarantee that no queue_rq is running concurrently with device disable code. Together with your another patch (adding blk_sync_queue), both sync/async path shall be handled correctly. > > Do you think synchronize_rcu shall be added to blk_sync_queue? I was nearly going to suggest the same last week, but it feels wrong since no one takes rcu_read_lock in the path we're trying to sychronoize. Is this safe if the task is interrupted?