From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755627AbbI2G4D (ORCPT ); Tue, 29 Sep 2015 02:56:03 -0400 Received: from verein.lst.de ([213.95.11.211]:57491 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755460AbbI2Gz5 (ORCPT ); Tue, 29 Sep 2015 02:55:57 -0400 Date: Tue, 29 Sep 2015 08:55:56 +0200 From: Christoph Hellwig To: Tejun Heo Cc: Akinobu Mita , LKML , Jens Axboe , Ming Lei , Christoph Hellwig Subject: Re: [PATCH v4 6/7] blk-mq: fix freeze queue race Message-ID: <20150929065556.GE14911@lst.de> References: <1443287365-4244-1-git-send-email-akinobu.mita@gmail.com> <1443287365-4244-7-git-send-email-akinobu.mita@gmail.com> <20150926173256.GA3572@htj.duckdns.org> <20150928144839.GA2589@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150928144839.GA2589@mtj.duckdns.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2015 at 10:48:39AM -0400, Tejun Heo wrote: > Ah, you're right. I was thinking that percpu_ref_switch_to_percpu() > being called after blk_mq_freeze_queue_start() would be buggy and thus > the above can't be enough but that is safe as long as the calls are > properly synchronized. Hmmm... maybe we should add synchronization to > those operations from percpu_ref side. I think that would be very useful, as most users of the code will have similar issues.