From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030306AbbCSReV (ORCPT ); Thu, 19 Mar 2015 13:34:21 -0400 Received: from mail-vc0-f170.google.com ([209.85.220.170]:49240 "EHLO mail-vc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030279AbbCSReR (ORCPT ); Thu, 19 Mar 2015 13:34:17 -0400 Date: Thu, 19 Mar 2015 13:34:13 -0400 From: Tejun Heo To: kent.overstreet@gmail.com, Benjamin LaHaise Cc: linux-kernel@vger.kernel.org, Jens Axboe Subject: serial percpu_ref draining in exit_aio() Message-ID: <20150319173413.GU25365@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Hello, So, Jens noticed that fio process exiting takes seconds when there are multiple aio contexts and the culprit seems to be the serial percpu_ref draining in exit_aio(). It's generally a bad idea to expose RCU latencies to userland because they add up really quickly and are unrelated to other performance parameters. Can you guys please at least update the code so that it waits for all percpu_refs to drain at the same time rather than one after another? That should resolve the worst part of the problem. Thanks. -- tejun