Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Feb 2015 01:27:21 -0500
From:      Alfred Perlstein <bright@mu.org>
To:        Konstantin Belousov <kostikbel@gmail.com>, fs@freebsd.org
Cc:        threads@freebsd.org
Subject:   Re: ZFS port and thread_exit()
Message-ID:  <54F15FC9.2090209@mu.org>
In-Reply-To: <20150228043144.GQ2379@kib.kiev.ua>
References:  <20150228043144.GQ2379@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2/27/15 11:31 PM, Konstantin Belousov wrote:
> While looking for some change to thread_exit(), I noted that ZFS
> on FreeBSD directly calls thread_exit(). It simply cannot work,
> thread_exit() is the internal function which requires the thread and
> process state prepared for it call. Among most obvious things, process
> spin lock must be held, but also several cleanups and accounting have to
> be done before the call.
>
> I believe the function just happens to have the same name as the Solaris
> counterpart, and for some reasons it is never called. If this is true,
> kthread_exit() should be used instead.
>
> Also, I noted that the userspace port defines thread_exit() as
> thr_exit(NULL). Again, the direct invocation of the syscall does not
> look right. The libthr library must do some cleanups on the thread exit,
> which are not done if syscall is invoked by an application code. Also,
> the thread itself gets no destructor calls.
>
> Could somebody interested in ZFS look into the issues ?
this sounds v important, needs a bugzilla in case no one steps up now, 
should be marked high priority.



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