Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261604AbUCKGnx (ORCPT ); Thu, 11 Mar 2004 01:43:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262902AbUCKGnx (ORCPT ); Thu, 11 Mar 2004 01:43:53 -0500 Received: from ns.virtualhost.dk ([195.184.98.160]:15327 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S261604AbUCKGnu (ORCPT ); Thu, 11 Mar 2004 01:43:50 -0500 Date: Thu, 11 Mar 2004 07:43:45 +0100 From: Jens Axboe To: Andrew Morton Cc: Miquel van Smoorenburg , linux-kernel@vger.kernel.org Subject: Re: [PATCH] backing dev unplugging Message-ID: <20040311064345.GB6955@suse.de> References: <20040310124507.GU4949@suse.de> <20040310130046.2df24f0e.akpm@osdl.org> <20040310210207.GL15087@suse.de> <20040310150542.13d71a39.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040310150542.13d71a39.akpm@osdl.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 44 On Wed, Mar 10 2004, Andrew Morton wrote: > > (Please use reply-to-all) > > "Miquel van Smoorenburg" wrote: > > > > In article <20040310210207.GL15087@suse.de>, > > Jens Axboe wrote: > > >On Wed, Mar 10 2004, Andrew Morton wrote: > > >> Jens Axboe wrote: > > >> > > > >> > Here's a first cut at killing global plugging of block devices to reduce > > >> > the nasty contention blk_plug_lock caused. > > >> > > >> Shouldn't we take read_lock(&md->map_lock) in dm_table_unplug_all()? > > > > > >Ugh yes, we certainly should. > > > > With the latest patches from Joe it would be more like > > > > map = dm_get_table(md); > > if (map) { > > dm_table_unplug_all(map); > > dm_table_put(map); > > } > > > > No lock ranking issues, you just get a refcounted map (table, really). > > Ah, OK. Jens, you'll be needing this (on rc2-mm1): > > dm.c: protect md->map with a rw spin lock rather than the md->lock > semaphore. Also ensure that everyone accesses md->map through > dm_get_table(), rather than directly. Neato, much better. I'll build on top of that. -- Jens Axboe - 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/