Re: Removing Giant asserts from geom

2016-05-19 Thread Alfred Perlstein
On 5/19/16 2:31 PM, Konstantin Belousov wrote: On Thu, May 19, 2016 at 01:57:53PM -0700, Alfred Perlstein wrote: OK, and why is thread0 needing Giant for so long? [Below is my opinion] It does not need Giant per se, it needs a work done to audit and turn it off. Probably most high profile su

Re: Removing Giant asserts from geom

2016-05-19 Thread Warner Losh
On Thu, May 19, 2016 at 3:31 PM, Konstantin Belousov wrote: > On Thu, May 19, 2016 at 01:57:53PM -0700, Alfred Perlstein wrote: >> OK, and why is thread0 needing Giant for so long? > [Below is my opinion] > > It does not need Giant per se, it needs a work done to audit and turn it > off. Probably

Re: Removing Giant asserts from geom

2016-05-19 Thread Konstantin Belousov
On Thu, May 19, 2016 at 01:57:53PM -0700, Alfred Perlstein wrote: > OK, and why is thread0 needing Giant for so long? [Below is my opinion] It does not need Giant per se, it needs a work done to audit and turn it off. Probably most high profile subsystem in the kernel still relying on Giant is the

Re: Removing Giant asserts from geom

2016-05-19 Thread Alfred Perlstein
On 5/19/16 12:12 PM, Konstantin Belousov wrote: On Thu, May 19, 2016 at 09:31:47AM -0700, Alfred Perlstein wrote: It seems like it should be the opposite, the DROP_GIANTs should be turned into mtx_assert(&Giant, MA_NOTOWNED) as giant is removed from the tree. Meaning Giant should be pushed fur

Re: Removing Giant asserts from geom

2016-05-19 Thread Warner Losh
On Thu, May 19, 2016 at 4:56 AM, Konstantin Belousov wrote: > I propose to remove asserts > mtx_assert(&Giant, MA_NOTOWNED); > from the geom KPI. I can't see any reason for the assertion in today's kernel. I might split out the lock / unlock of giant around thread creation since

Re: Removing Giant asserts from geom

2016-05-19 Thread Konstantin Belousov
On Thu, May 19, 2016 at 09:31:47AM -0700, Alfred Perlstein wrote: > It seems like it should be the opposite, the DROP_GIANTs should be > turned into mtx_assert(&Giant, MA_NOTOWNED) as giant is removed from the > tree. > > Meaning Giant should be pushed further back until it is eliminated. > Doi

Re: Removing Giant asserts from geom

2016-05-19 Thread Alfred Perlstein
It seems like it should be the opposite, the DROP_GIANTs should be turned into mtx_assert(&Giant, MA_NOTOWNED) as giant is removed from the tree. Meaning Giant should be pushed further back until it is eliminated. Doing as this patch proposes hides that we still have callers holding Giant whi

Re: Removing Giant asserts from geom

2016-05-19 Thread Poul-Henning Kamp
In message <20160519105634.go89...@kib.kiev.ua>, Konstantin Belousov writes: >I propose to remove asserts > mtx_assert(&Giant, MA_NOTOWNED); By all means. They were necessary because GEOM happened in the early days of SMP where things were strange and locks unpredictable.

Removing Giant asserts from geom

2016-05-19 Thread Konstantin Belousov
I propose to remove asserts mtx_assert(&Giant, MA_NOTOWNED); from the geom KPI. The asserts do not serve any purposes, at least not in the current kernel. They might provided some agenda in the 5.x days, but now they only force filesystems to add cruft to satisfy GEOM KPI requirem