From patchwork Mon Jan 3 13:49:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 77264 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 57956B70CD for ; Tue, 4 Jan 2011 00:53:30 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755369Ab1ACNus (ORCPT ); Mon, 3 Jan 2011 08:50:48 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:36659 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755103Ab1ACNup (ORCPT ); Mon, 3 Jan 2011 08:50:45 -0500 Received: by mail-bw0-f46.google.com with SMTP id 15so13706072bwz.19 for ; Mon, 03 Jan 2011 05:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=e6hGAamkWiQU/1J06DAfjKqM7tQtgZji2dm6KTL/z+c=; b=oplh1rqiPu/EI7rlyhxpxSgZLZL46QRGozjUSMlAM3wYJVsm+6Vsf+2mDt9hQaxNn8 CTLOv3aq78porWyDgIabea9F8tYDX/P7znjc+hyxZifuaNQxb1U0NM8OrL627uXqUpJP yQgW2snGSHtganAfY1eUPaU7+7ytq4mxLiVQs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Iw7HGz7+l5fQ7Dg1HwpOCFod6hlkU7CDuVu6cDxQ4xaQycUWvaAMtu92iheRr5yDw6 +GUIjGCQ0ii6B38mDaOZrHrK5vL1eXZWgKfilu/TJ+9YwGaydMYYugkRNpCayuXjQbI7 TsgBAlGHKdWfaBMhoatIZuLBdhYVXVM27GzDE= Received: by 10.204.81.218 with SMTP id y26mr3072732bkk.146.1294062644283; Mon, 03 Jan 2011 05:50:44 -0800 (PST) Received: from localhost.localdomain ([130.75.117.88]) by mx.google.com with ESMTPS id f20sm9026594bkf.4.2011.01.03.05.50.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 05:50:43 -0800 (PST) From: Tejun Heo To: linux-kernel@vger.kernel.org Cc: Tejun Heo , "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org Subject: [PATCH 25/32] ext4: convert to alloc_workqueue() Date: Mon, 3 Jan 2011 14:49:48 +0100 Message-Id: <1294062595-30097-26-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1294062595-30097-1-git-send-email-tj@kernel.org> References: <1294062595-30097-1-git-send-email-tj@kernel.org> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Convert create_workqueue() to alloc_workqueue(). This is an identity conversion. Signed-off-by: Tejun Heo Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: linux-ext4@vger.kernel.org --- It might be helpful to use higher max concurrency. I don't think it would make a lot of difference tho. Please feel free to take it into the subsystem tree or simply ack - I'll route it through the wq tree. Thanks. fs/ext4/super.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index fb15c9c..f682c40 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3495,7 +3495,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) percpu_counter_set(&sbi->s_dirtyblocks_counter, 0); no_journal: - EXT4_SB(sb)->dio_unwritten_wq = create_workqueue("ext4-dio-unwritten"); + /* + * The maximum number of concurrent works can be high and + * concurrency isn't really necessary. Limit it to 1. + */ + EXT4_SB(sb)->dio_unwritten_wq = + alloc_workqueue("ext4-dio-unwritten", WQ_MEM_RECLAIM, 1); if (!EXT4_SB(sb)->dio_unwritten_wq) { printk(KERN_ERR "EXT4-fs: failed to create DIO workqueue\n"); goto failed_mount_wq;