Date: Fri, 23 Aug 2013 17:29:45 +0200 From: Davide Italiano <davide@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys Message-ID: <CACYV=-H_CaCf9Ob=XW1fPZtPwNSYfdVdn2eNxnEV-ta7HiNhUw@mail.gmail.com> In-Reply-To: <201308231051.08997.jhb@freebsd.org> References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201308231051.08997.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin <jhb@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACYV=-H_CaCf9Ob=XW1fPZtPwNSYfdVdn2eNxnEV-ta7HiNhUw>