Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbZKBK0y (ORCPT ); Mon, 2 Nov 2009 05:26:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754426AbZKBK0y (ORCPT ); Mon, 2 Nov 2009 05:26:54 -0500 Received: from one.firstfloor.org ([213.235.205.2]:36408 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754349AbZKBK0x (ORCPT ); Mon, 2 Nov 2009 05:26:53 -0500 Date: Mon, 2 Nov 2009 11:26:54 +0100 From: Andi Kleen To: Jan Blunck Cc: linux-fsdevel@vger.kernel.org, Matthew Wilcox , linux-kernel@vger.kernel.org, Andi Kleen , Jan Kara , Al Viro , Andrew Morton , Andi Kleen , Christoph Hellwig , Pekka Enberg , Andreas Dilger , linux-ext4@vger.kernel.org Subject: Re: [PATCH 04/27] ext2: Add ext2_sb_info mutex Message-ID: <20091102102654.GG31511@one.firstfloor.org> References: <1257156307-24175-1-git-send-email-jblunck@suse.de> <1257156307-24175-5-git-send-email-jblunck@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1257156307-24175-5-git-send-email-jblunck@suse.de> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 938 Lines: 24 > @@ -762,6 +767,12 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) > sbi->s_sb_block = sb_block; > > /* > + * mutex for protection of modifications of the superblock while being > + * write out by ext2_write_super() or ext2_sync_fs(). > + */ > + mutex_init(&sbi->s_mutex); I didn't go over all the code paths in detail, but if you replace the BKL with a mutex that is hold over a longer write-out sleep period you potentially limit IO parallelism a lot. In this case since the BKL didn't protect over the sleep anyways it might be reasonable to drop it during the IO operation (and possibly if you're sure nothing else sleeps use a spin lock) -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/