Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753779Ab2K2CE3 (ORCPT ); Wed, 28 Nov 2012 21:04:29 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:55278 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752444Ab2K2CE1 (ORCPT ); Wed, 28 Nov 2012 21:04:27 -0500 MIME-Version: 1.0 In-Reply-To: References: <50B46E05.70906@kernel.dk> <50B4B313.3030707@kernel.dk> <50B5CC5A.8060607@kernel.dk> From: Linus Torvalds Date: Wed, 28 Nov 2012 18:04:06 -0800 X-Google-Sender-Auth: 8wocM7iMOlaJLaEwHAqgST3-d1U Message-ID: Subject: Re: [PATCH] Introduce a method to catch mmap_region (was: Recent kernel "mount" slow) To: Mikulas Patocka Cc: Jens Axboe , Jeff Chua , Lai Jiangshan , Jan Kara , lkml , linux-fsdevel Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 28 [ Sorry, I was offline for a while driving kids around ] On Wed, Nov 28, 2012 at 4:38 PM, Mikulas Patocka wrote: > > It can happen. Take your patch (the one that moves bd_block_size_semaphore > into blkdev_readpage, blkdev_writepage and blkdev_write_begin). Interesting. The code *has* the block size (it's in "bh->b_size"), but it actually then uses the inode blocksize instead, and verifies the two against each other. It could just have used the block size directly (and then used the inode i_blkbits only when no buffers existed), avoiding that dependency entirely.. It actually does the same thing (with the same verification) in __block_write_full_page() and (_without_ the verification) in __block_commit_write(). Ho humm. All of those places actually do hold the rwsem for reading, it's just that I don't want to hold it for writing over the sync.. Need to think on this, Linus -- 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/