From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752831AbaJ1U0m (ORCPT ); Tue, 28 Oct 2014 16:26:42 -0400 Received: from mail-qg0-f49.google.com ([209.85.192.49]:59320 "EHLO mail-qg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbaJ1U0l (ORCPT ); Tue, 28 Oct 2014 16:26:41 -0400 Date: Tue, 28 Oct 2014 16:26:37 -0400 From: Tejun Heo To: Christian Borntraeger Cc: Kent Overstreet , Jens Axboe , Christoph Hellwig , "linux-kernel@vger.kernel.org >> Linux Kernel Mailing List" , linux-s390 Subject: Re: blk-mq vs cpu hotplug performance (due to percpu_ref_put performance) Message-ID: <20141028202637.GC8205@htj.dyndns.org> References: <544FF00B.8050403@de.ibm.com> <20141028200055.GA8205@htj.dyndns.org> <544FFAA7.1060705@de.ibm.com> <20141028202255.GB8205@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141028202255.GB8205@htj.dyndns.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 28, 2014 at 04:22:55PM -0400, Tejun Heo wrote: > On Tue, Oct 28, 2014 at 09:20:55PM +0100, Christian Borntraeger wrote: > > I have not verified this, but I guess what happens is: > > hotplug > > -> notify > > -> blk_mq_queue_reinit_notify > > -> blk_mq_queue_reinit > > -> blk_mq_freeze_queue > > -> percpu_ref_kill > > -> percpu_ref_kill_and_confirm > > -> __percpu_ref_switch_to_atomic > > -> call_rcu_sched > > But call_rcu_sched() wouldn't show up as latency. It's an async call > unlike synchronize_*(). I got confused, so perpcu_ref does wait for the async grace period making it synchronous. I see what you mean. This isn't during init but freezing itself being slow. Hmmmm... so are you seeing multiple queues doing that back-to-back? If so, the right thing to do would be making the freezing take place in parallel. I'll look into it. Thanks. -- tejun