From owner-freebsd-geom@FreeBSD.ORG Mon Dec 8 00:20:56 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFB7D1065677 for ; Mon, 8 Dec 2008 00:20:56 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE658FC1B for ; Mon, 8 Dec 2008 00:20:56 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by rn-out-0910.google.com with SMTP id j71so991667rne.12 for ; Sun, 07 Dec 2008 16:20:55 -0800 (PST) Received: by 10.90.83.2 with SMTP id g2mr978365agb.79.1228695655466; Sun, 07 Dec 2008 16:20:55 -0800 (PST) Received: by 10.90.73.15 with HTTP; Sun, 7 Dec 2008 16:20:55 -0800 (PST) Message-ID: Date: Mon, 8 Dec 2008 01:20:55 +0100 From: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" To: "Poul-Henning Kamp" In-Reply-To: <31114.1228597207@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <31114.1228597207@critter.freebsd.dk> Cc: freebsd-geom@freebsd.org Subject: Re: Trivial(?) reorganization of topology lock in geom_event X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 00:20:56 -0000 On Sat, Dec 6, 2008 at 10:00 PM, Poul-Henning Kamp wrote: > In message , "=?ISO- > 8859-1?Q?Marius_N=FCnnerich?=" writes: >>Hi, >> >>while working on the DTrace probes for geom I noticed that >>g_topology_lock() is called 20 times per second from the g_event >>thread, even though the thread only runs 10 times per second when >>idle. Maybe it is possible to change the locking like in this patch? I >>also changed the position of one unlocking of g_eventlock. > > In theory the timeout is not necessary, it was added as a stopgap > because there were synchronisation issues long time ago. > > Try dropping the timeout and see if you can provoke problems, > if not, kill it. Did so, please take a look at this patch: http://nuenneri.ch/freebsd/geom_tl2.patch I am running a version of this with the DTrace probes included, I hope the patch is complete. I did a few buildkernels and some of the geom regression tests, so far no problems. I changed the position of the loop to better match how it's like in the up and down threads. What do you think of it? Thanks Marius