From owner-freebsd-geom@FreeBSD.ORG Sat Dec 6 21:00:12 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 5AFA71065672 for ; Sat, 6 Dec 2008 21:00:10 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2158FC08 for ; Sat, 6 Dec 2008 21:00:09 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 6BF6B170E0; Sat, 6 Dec 2008 21:00:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id mB6L07qm031115; Sat, 6 Dec 2008 21:00:07 GMT (envelope-from phk@critter.freebsd.dk) To: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 04 Dec 2008 21:41:49 +0100." Date: Sat, 06 Dec 2008 21:00:07 +0000 Message-ID: <31114.1228597207@critter.freebsd.dk> Sender: phk@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: Sat, 06 Dec 2008 21:00:12 -0000 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. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.