From owner-svn-src-all@FreeBSD.ORG Fri Aug 23 15:29:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18C2EA4C; Fri, 23 Aug 2013 15:29:47 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [IPv6:2607:f8b0:400c:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 951562ED2; Fri, 23 Aug 2013 15:29:46 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id ib11so530825vcb.14 for ; Fri, 23 Aug 2013 08:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=KhQFOwx9xDErVqyz5jnCLJpVqZvLivfJoAbml3CBV8s=; b=G0lg5qXvppwtQ5ZmJ65PsOVCo7ldgMv7OZjl60OorA+UJodF/XylNXuXZ5VQY5Cvcs Ezy3/JrSxpdiZjQqq3UXqPQQZx99+LfZrZiAdUdJ3z0SVwxxPBg9+gG/ays8f564FxZG Wf6BCDGRlDzuwSXeIHB81f2PGnYhplCSzpJnEvEl++jcbGDDu1ZQzmyoctJpyonWNG3t SxzySlEaKtCe6so3zwnwu02o92LdKPsavDmvO85ZZQ/94//9MBqA9l9ReSpxBUM1U286 VCbAwwH0SxVT8b/87F9u2StQBsMjqkQewLRb6fdbSpaVFGYhRCD1ORC0Wc61JOiK2Rta m2MQ== MIME-Version: 1.0 X-Received: by 10.52.103.35 with SMTP id ft3mr108529vdb.5.1377271785679; Fri, 23 Aug 2013 08:29:45 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Fri, 23 Aug 2013 08:29:45 -0700 (PDT) In-Reply-To: <201308231051.08997.jhb@freebsd.org> References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201308231051.08997.jhb@freebsd.org> Date: Fri, 23 Aug 2013 17:29:45 +0200 X-Google-Sender-Auth: _kF8COaHH59vE4w7VIdavWq-fVU Message-ID: Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys From: Davide Italiano To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 15:29:47 -0000 On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin wrote: > On Friday, August 23, 2013 10:12:39 am Davide Italiano wrote: >> Author: davide >> Date: Fri Aug 23 14:12:39 2013 >> New Revision: 254703 >> URL: http://svnweb.freebsd.org/changeset/base/254703 >> >> Log: >> Introduce callout_init_rm() so that callouts can be used in conjunction >> with rmlocks. This works only with non-sleepable rm because handlers run >> in SWI context. While here, document the new KPI in the timeout(9) >> manpage. > > It also only works with exclusive locks. (lc_unlock/lc_lock only handle > write locks for rmlocks). > > -- > John Baldwin Thanks for pointing out this. I think it would be nice to have lc_lock/lc_unlock working both for shared and exclusive locks but I'm not 100% sure about all the implications/complications. From what I see for rwlocks asserting if a lock is held in read-mode is really cheap (check against a flag) while for rmlocks the assertion relies on traversing the tracker list for the rmlock so I'm worried this operation could be expensive. What's your opinion about? Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare