Commit Graph

40 Commits

Author SHA1 Message Date
Brian Behlendorf 8c28ed9bff Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-08-04 15:54:19 -07:00
Brian Behlendorf 7069d048a0 Revert kthreads based on pthread thread specific data due to failure.
With this patch applied I get the following failure 100% of the time,
I'd prefer to debug it and keep moving forward but I do not have the
time right now so I'm reverting the patch to the version which worked.
Ricardo please fix.

(gdb) bt
0  ztest_dmu_write_parallel (za=0x2aaaac898960) at
../../cmd/ztest/ztest.c:2566
1  0x0000000000405a79 in ztest_thread (arg=<value optimized out>)
    at ../../cmd/ztest/ztest.c:3862
2  0x00002b2e6a7a841d in zk_thread_helper (arg=<value optimized out>)
    at ../../lib/libzpool/kernel.c:131
3  0x000000379be06367 in start_thread (arg=<value optimized out>)
    at pthread_create.c:297
4  0x000000379b2d30ad in clone () from /lib64/libc.so.6
2009-08-04 15:42:24 -07:00
Brian Behlendorf 9aedfd95f6 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-08-04 14:39:06 -07:00
Ricardo M. Correia c0ce3b40f2 Reimplement user kthreads based on pthread thread specific data.
This resolves previous scalabily concerns about the cost of calling
curthread which previously required a list walk.  The kthread address
is now tracked as thread specific data which can be quickly returned.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2009-08-04 13:55:15 -07:00
Brian Behlendorf 9a2275c1c5 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-07-24 11:08:42 -07:00
Ricardo M. Correia 51760e3c7e Change VERIFY() into VERIFY3U() when creating threads in ztest, so that we can see the return code when it fails.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2009-07-24 11:00:23 -07:00
Brian Behlendorf e9d7526fb3 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-07-14 16:49:27 -07:00
Brian Behlendorf a13cdecdd2 Remove debug printf 2009-07-14 16:35:13 -07:00
Brian Behlendorf 9b9f17a585 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-07-14 14:34:37 -07:00
Brian Behlendorf 864e44e7e0 Provide correct kthread API semantics using pthreads.
The intent here is to fully remove the previous Solaris thread
implementation so we don't need to simulate both Solaris kernel
and user space thread APIs.  The few user space consumers of the
thread API have been updated to use the kthread API.  In order
to support this we needed to more fully support the kthread API
and that means not doing crazy things like casting a thread id
to a pointer and using that as was done before.  This first
implementation is not effecient but it does provide all the
corrent semantics.  If/when performance becomes and issue we
can and should just natively adopt pthreads which is portable.

Let me finish by saying I'm not proud of any of this and I would
love to see it improved.  However, this slow implementation does
at least provide all the correct kthread API semantics whereas
the previous method of casting the thread ID to a pointer was
dodgy at best.
2009-07-14 14:16:26 -07:00
Brian Behlendorf 275d66171b Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-07-08 15:00:41 -07:00
Brian Behlendorf 1ab1b8502b Stop the kthread/thread/pthread mixing and matching insanity. Update all
code to only use the kthread API regardless of if it is compiled in the
kernel or user space.  The kthread API will be layered on top of pthreads
as best as possible in zfs_context, this is non optimal but much clearer.
2009-07-08 14:47:23 -07:00
Brian Behlendorf eb811f7fa9 Merge branch 'feature-branch' into refs/top-bases/zfs-branch
Conflicts:

	module/zfs/include/sys/dmu_tx.h
	module/zfs/include/sys/txg.h
2009-03-19 20:59:12 -07:00
Brian Behlendorf 54b5b41a58 Add 'feature-pthreads' branch to features branch. 2009-03-19 20:49:52 -07:00
Brian Behlendorf 8cdcf1ef44 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2009-03-19 19:49:55 -07:00
Brian Behlendorf 05cec154f5 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2009-03-19 19:49:53 -07:00
Brian Behlendorf 53db4c7b29 Revert fix-pthreads moving to feature-pthreads branch 2009-03-19 19:43:09 -07:00
Brian Behlendorf 6a5acaa105 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-12 15:44:13 -07:00
Brian Behlendorf 9fe5b916e2 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2009-03-12 15:39:27 -07:00
Brian Behlendorf 9e49df6b20 Add gcc-fortify-source branch 2009-03-12 15:38:51 -07:00
Brian Behlendorf 15f5ddebdf Merge commit 'refs/top-bases/fix-pthreads' into fix-pthreads
Conflicts:

	lib/libzpool/kernel.c
2009-02-18 14:29:08 -08:00
Brian Behlendorf 6fe19bd252 Merge branch 'fix-clock-wrap' into refs/top-bases/fix-branch
Conflicts:

	lib/libzpool/kernel.c
	module/zfs/arc.c
2009-02-18 14:28:15 -08:00
Brian Behlendorf f0a8aedfbc Merge branch 'gcc-branch' into refs/top-bases/zfs-branch
Conflicts:

	lib/libzpool/kernel.c
	module/zfs/arc.c
2009-02-18 14:27:12 -08:00
Brian Behlendorf f686a87058 Merge branch 'gcc-c90' into refs/top-bases/gcc-branch
Conflicts:

	module/zfs/arc.c
2009-02-18 13:12:26 -08:00
Brian Behlendorf d164b20935 Rebase master to b108 2009-02-18 12:51:31 -08:00
Brian Behlendorf 9c0846462b Resolve conflict 2008-12-18 10:01:37 -08:00
Brian Behlendorf 4df7b421a1 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2008-12-18 10:00:46 -08:00
Brian Behlendorf 25a3fca866 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2008-12-18 10:00:45 -08:00
Brian Behlendorf 9e195d0cbf Merge branch 'gcc-invalid-prototype' into refs/top-bases/gcc-branch 2008-12-18 10:00:44 -08:00
Brian Behlendorf c8f253cda8 Now fixed in fix-pthreads branch 2008-12-18 09:58:42 -08:00
Brian Behlendorf 229aba2943 Properly cast thread functions for pthreads 2008-12-18 09:56:22 -08:00
Brian Behlendorf 935fd6c681 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2008-12-17 11:27:20 -08:00
Brian Behlendorf 55c8582174 Merge branch 'gcc-shadow' into refs/top-bases/gcc-branch 2008-12-17 11:27:19 -08:00
Brian Behlendorf dcf0fb9ffb Resolve shadow conflicts 2008-12-17 11:25:21 -08:00
Brian Behlendorf f07f82e93a Merge commit 'refs/top-bases/fix-pthreads' into fix-pthreads 2008-12-11 11:26:43 -08:00
Brian Behlendorf 84e65c5c1e Merge branch 'fix-clock-wrap' into refs/top-bases/fix-branch 2008-12-11 11:25:50 -08:00
Brian Behlendorf 756a122d37 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2008-12-11 11:25:42 -08:00
Brian Behlendorf 8f8ac4288f Merge commit 'refs/top-bases/gcc-invalid-prototype' into gcc-invalid-prototype 2008-12-11 11:25:09 -08:00
Brian Behlendorf 4f5d567cfd Merge branch 'gcc-c90' into refs/top-bases/gcc-branch 2008-12-11 11:24:45 -08:00
Brian Behlendorf 172bb4bd5e Move the world out of /zfs/ and seperate out module build tree 2008-12-11 11:08:09 -08:00