Date: Sat, 14 Mar 2015 09:03:29 +0800 From: Tiwei Bie <btw@mail.ustc.edu.cn> To: Mateusz Guzik <mjguzik@gmail.com> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Ryan Stone <rysto32@gmail.com>, wca@freebsd.org Subject: Re: [PATCH] Finish the task 'Convert mountlist_mtx to rwlock' Message-ID: <20150314010329.GA2559@freebsd> In-Reply-To: <20150313200705.GA32157@dft-labs.eu> References: <1426079434-51568-1-git-send-email-btw@mail.ustc.edu.cn> <CAFMmRNyLJgLuk-VPSuyBCpO1bkdmyGf3s89X-An1vCCMwn=B=A@mail.gmail.com> <20150312132338.GA57932@freebsd> <20150313200705.GA32157@dft-labs.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 13, 2015 at 09:07:05PM +0100, Mateusz Guzik wrote: > On Thu, Mar 12, 2015 at 09:26:00PM +0800, Tiwei Bie wrote: > > On Thu, Mar 12, 2015 at 12:06:02AM -0400, Ryan Stone wrote: > > > On Wed, Mar 11, 2015 at 9:10 AM, Tiwei Bie <btw@mail.ustc.edu.cn> wrote: > > > > Hi, Mateusz! > > > > > > > > I have finished the task: Convert mountlist_mtx to rwlock [1]. > > > > > > My first comment is, are we sure that we actually want an rwlock here > > > instead of an rmlock? An rmlock will offer much better performance in > > > workloads that mostly only take read locks, and rmlocks do not suffer > > > the priority inversion problems that rwlocks do. From the description > > > on the wiki page, it sounds like an rmlock would be ideal here: > > > > > > > Interested person can upgrade this task to non-junior by coming up with a > > > > solution exploiting rare need to modify the list. Example approaches include > > > > designing a locking primitive with cheap shared locking (think: per-cpu) at > > > > the expense of exclusive locking. > > > > > > > I think rmlock is okay. But one more argument needs to be added > > to vfs_busy(), that is 'struct rm_priotracker *tracker' which is > > used to track read owners of mountlist_lock in vfs_busy(). > > So, this is not a simple s/rw_lock/rm_rlock and the like after all, sorry. :) > > I'll have to go over this and possibly gather some ACKs before > committing. > Never mind, just do whatever necessary and make the best choice! ^_^ Tiwei Bie
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150314010329.GA2559>