Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932767Ab2K1WLk (ORCPT ); Wed, 28 Nov 2012 17:11:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56426 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932533Ab2K1WLh (ORCPT ); Wed, 28 Nov 2012 17:11:37 -0500 Date: Wed, 28 Nov 2012 17:10:47 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file.rdu.redhat.com To: Linus Torvalds cc: Jens Axboe , Jeff Chua , Lai Jiangshan , Jan Kara , lkml , linux-fsdevel Subject: Re: [PATCH] Introduce a method to catch mmap_region (was: Recent kernel "mount" slow) In-Reply-To: Message-ID: References: <50B46E05.70906@kernel.dk> <50B4B313.3030707@kernel.dk> <50B5CC5A.8060607@kernel.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1241 Lines: 32 On Wed, 28 Nov 2012, Linus Torvalds wrote: > On Wed, Nov 28, 2012 at 12:32 PM, Linus Torvalds > wrote: > > > > Here is a *COMPLETELY* untested patch. Caveat emptor. It will probably > > do unspeakable things to your family and pets. > > Btw, *if* this approach works, I suspect we could just switch the > bd_block_size_semaphore semaphore to be a regular rw-sem. > > Why? Because now it's no longer ever gotten in the cached IO paths, we > only get it when we're doing much more expensive things (ie actual IO, > and buffer head allocations etc etc). As long as we just work with the > page cache, we never get to the whole lock at all. > > Which means that the whole percpu-optimized thing is likely no longer > all that relevant. Using normal semaphore degrades direct-IO performance on raw devices, I measured that (45.1s with normal rw-semaphore vs. 42.8s with percpu-rw-semaphore). It could be measured on ramdisk or high-performance SSDs. Mikulas -- 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/