Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 2015 14:27:39 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        Steven Hartland <steven@multiplay.co.uk>
Cc:        Warner Losh <imp@bsdimp.com>, src-committers@freebsd.org, Peter Wemm <peter@wemm.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Konstantin Belousov <kostikbel@gmail.com>, Julian Elischer <julian@freebsd.org>
Subject:   Re: svn commit: r286223 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <20150805112739.GE8792@zxy.spb.ru>
In-Reply-To: <55C1EF1F.6040204@multiplay.co.uk>
References:  <55BF557B.60009@multiplay.co.uk> <20150803120359.GC2072@kib.kiev.ua> <55BFC296.5050402@freebsd.org> <20150803194412.GC8792@zxy.spb.ru> <CFB4CACC-E730-47BD-905D-03F8DCF863F9@bsdimp.com> <55C07826.9070002@multiplay.co.uk> <20150804161448.GC24698@zxy.spb.ru> <55C11B5F.2080007@multiplay.co.uk> <20150804202411.GD8792@zxy.spb.ru> <55C1EF1F.6040204@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 05, 2015 at 12:10:23PM +0100, Steven Hartland wrote:

> >> Just in case you didn't notice kib committed a fix for i386 thread0 in
> >> r286288 so this may not be needed at all any more which is good news :)
> > If I understund kib fix (and you about ZFS stack requirements) you
> > need check curthread->td_kstack_pages (for case old, unfixed kerenel,
> > depended from KSTACK_PAGES in Thread0).
> >
> > I.e. for all cases:
> >
> > - unfixed kernel with KSTACK_PAGES < 4
> > - unfixed kernel with KSTACK_PAGES >= 4
> > - fixed kernel with KSTACK_PAGES < 4
> > - fixed kernel with KSTACK_PAGES >= 4
> > - compiling zfs.ko separately from kernel with different KSTACK_PAGES
> > - using zfs.ko with old kernel
> >
> > checking curthread->td_kstack_pages is right way (or, may be
> > curthread->td_kstack_pages*PAGE_SIZE -- I am not cleanly understund
> > what need to check -- size in bytes or size in pages).
> > Checking KSTACK_PAGES by ifdef can produce vrong result.
> Its not clear to me if curthread will be thread0 however in unfixed

printf("zfs__init thread check: curthread %p thread0 %p\n", curthread, &thread0) ?

> thread0 stack size would have been kstack_pages so at the time this was 
> still correct IMO.

Not clear to me where is real limitaion -- in thread0 or in thread
executed zfs__init.

Just for me, what is correct?

1) limitation in thread0 (some code from ZFS executed later in
   thread0, not in current tread), not in zfs__init
2) limitation in zfs__init (or in some code executed later in current
   thread), currently zfs__init exeuted in thread0

> Just to be clear this is not checked by an ifdef, that's just OS guard 
> which is correct.
> 
> Latest revision which now explicitly checks thread0 stack size is now 
> available:
> https://reviews.freebsd.org/D3279

nice to me.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150805112739.GE8792>