Date: Tue, 13 Jul 2021 17:13:08 +0200 From: Hans Petter Selasky <hps@selasky.org> To: gljennjohn@gmail.com, Warner Losh <imp@bsdimp.com> Cc: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Michael Gmelin <freebsd@grem.de>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: Killing Giant for 13 Message-ID: <d0105f03-73fe-1e8f-0fbe-8c180f2679a6@selasky.org> In-Reply-To: <20191127082615.7c59857c@ernst.home> References: <CANCZdfr0CpDBQ6QWJ_CTtOLW6EwAke_Vr_imqa5=GBzRAoa6eA@mail.gmail.com> <201911260917.xAQ9Hcf1001914@gndrsh.dnsmgr.net> <CANCZdfowGPBgp14aaJ15GnYOkRb_C91AeRqFY-axqu%2BCOScz8w@mail.gmail.com> <20191126193555.047a63cf@bsd64.grem.de> <20191126194750.3ff939c3@ernst.home> <CANCZdfoOXXd88kaJtkHfkfmdCkv2WnoXZBNedjyEOb8jxGK==A@mail.gmail.com> <20191127082615.7c59857c@ernst.home>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I've been pondering with some ideas around Giant removal too. First of all, I think the first step getting rid of Giant, is to move all Giant usage related to newbus into two own global functions, so we can start working on what and how the device tree should be protected separately. Personally I would prefer a sleepable EPOCH (See https://reviews.freebsd.org/D30376), because that would interact nicely with freeing the device softc and other internal structures. void device_tree_lock() { mtx_lock(&Giant); } void device_tree_unlock() { mtx_unlock(&Giant); } Secondly I think that if we can remove all code sleeping with Giant, so to speak, either by using msleep(&Giant) or by using M_NOWAIT, we can get rid of the DROP and PICKUP Giant macros, and get Giant out of the fast path in all of the kernel. Then if Giant i still around as a mutex, it won't have that much impact! Warner, what is the status of your Giant work? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d0105f03-73fe-1e8f-0fbe-8c180f2679a6>