From owner-freebsd-geom@FreeBSD.ORG Thu Dec 4 20:41:52 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 054E51065670 for ; Thu, 4 Dec 2008 20:41:52 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id C01DE8FC1C for ; Thu, 4 Dec 2008 20:41:51 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by yx-out-2324.google.com with SMTP id 8so1830139yxb.13 for ; Thu, 04 Dec 2008 12:41:50 -0800 (PST) Received: by 10.90.29.17 with SMTP id c17mr8268012agc.13.1228423309654; Thu, 04 Dec 2008 12:41:49 -0800 (PST) Received: by 10.90.73.15 with HTTP; Thu, 4 Dec 2008 12:41:49 -0800 (PST) Message-ID: Date: Thu, 4 Dec 2008 21:41:49 +0100 From: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: 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: Thu, 04 Dec 2008 20:41:52 -0000 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. Patch (relative to src/sys): http://nuenneri.ch/freebsd/geom_tl.patch As a side note: Do all the msleep calls have to have a timeout? Why is this so? Kind regards Marius