Re: svn commit: r282971 - in head/sys: kern sys

2015-05-22 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 5/21/15 09:58, Mateusz Guzik wrote: In other words, I would argue modifying native privmitives to accomodate for zfs use may not be the best course of action. Well, POSIX says this about pthread_cond_destroy(), quote: A condition variable

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-21 Thread Mateusz Guzik
On Thu, May 21, 2015 at 11:33:02AM -0400, John Baldwin wrote: On Wednesday, May 20, 2015 12:00:46 PM Alexander Kabaev wrote: On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin j...@freebsd.org wrote: Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL:

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-21 Thread John Baldwin
On Wednesday, May 20, 2015 12:00:46 PM Alexander Kabaev wrote: On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin j...@freebsd.org wrote: Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL: https://svnweb.freebsd.org/changeset/base/282971 Log: Previously,

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-21 Thread John Baldwin
On Wednesday, May 20, 2015 02:26:18 PM Xin Li wrote: I think we should also assert that no waiter remains when a conditional variable is destroyed (which also suggests that the memory may be freed shortly). Otherwise we would either have modify after free or lost wakeups. We already assert

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-20 Thread Matthew Ahrens
On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev kab...@gmail.com wrote: On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin j...@freebsd.org wrote: Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL: https://svnweb.freebsd.org/changeset/base/282971 Log:

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-20 Thread Xin Li
I think we should also assert that no waiter remains when a conditional variable is destroyed (which also suggests that the memory may be freed shortly). Otherwise we would either have modify after free or lost wakeups. Cheers, -- Xin LI delp...@delphij.nethttps://www.delphij.net/ FreeBSD -

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-20 Thread Alexander Kabaev
On Wed, 20 May 2015 09:54:45 -0700 Matthew Ahrens m...@mahrens.org wrote: On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev kab...@gmail.com wrote: On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin j...@freebsd.org wrote: Author: jhb Date: Fri May 15 13:50:37 2015 New

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-20 Thread Matthew Ahrens
On Wed, May 20, 2015 at 10:41 AM, Alexander Kabaev kab...@gmail.com wrote: On Wed, 20 May 2015 09:54:45 -0700 Matthew Ahrens m...@mahrens.org wrote: On Wed, May 20, 2015 at 9:00 AM, Alexander Kabaev kab...@gmail.com wrote: On Fri, 15 May 2015 13:50:38 + (UTC) John Baldwin

svn commit: r282971 - in head/sys: kern sys

2015-05-15 Thread John Baldwin
Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL: https://svnweb.freebsd.org/changeset/base/282971 Log: Previously, cv_waiters was only updated by cv_signal or cv_wait. If a thread awakened due to a time out, then cv_waiters was not decremented. If INT_MAX threads timed

Re: svn commit: r282971 - in head/sys: kern sys

2015-05-15 Thread John Baldwin
On Friday, May 15, 2015 01:50:38 PM John Baldwin wrote: Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL: https://svnweb.freebsd.org/changeset/base/282971 Log: Previously, cv_waiters was only updated by cv_signal or cv_wait. If a thread awakened due to a time out,