Commit Graph

1318 Commits

Author SHA1 Message Date
Brian Behlendorf 89cd45bf85 Merge commit 'refs/top-bases/fix-stack-dsl_deleg_get' into fix-stack-dsl_deleg_get 2010-06-29 14:41:22 -07:00
Brian Behlendorf 4e8810b3ff Merge branch 'fix-stack-dsl_dir_open_spa' into refs/top-bases/fix-branch 2010-06-29 14:41:20 -07:00
Brian Behlendorf fd66f491b4 Merge commit 'refs/top-bases/fix-stack-dsl_dir_open_spa' into fix-stack-dsl_dir_open_spa 2010-06-29 14:41:20 -07:00
Brian Behlendorf eed68d5e3f Merge branch 'fix-stack-lzjb' into refs/top-bases/fix-branch 2010-06-29 14:41:19 -07:00
Brian Behlendorf 1badbf8463 Merge commit 'refs/top-bases/fix-stack-lzjb' into fix-stack-lzjb 2010-06-29 14:41:18 -07:00
Brian Behlendorf 9559cbca21 Merge branch 'fix-kstat-xuio' into refs/top-bases/fix-branch 2010-06-29 14:41:17 -07:00
Brian Behlendorf ec6656eadc Merge commit 'refs/top-bases/fix-kstat-xuio' into fix-kstat-xuio 2010-06-29 14:41:17 -07:00
Brian Behlendorf 73cf09d2ec Merge branch 'fix-metaslab' into refs/top-bases/fix-branch 2010-06-29 14:41:16 -07:00
Brian Behlendorf 3cddd49624 Merge commit 'refs/top-bases/fix-metaslab' into fix-metaslab 2010-06-29 14:41:15 -07:00
Brian Behlendorf 01df3b60cc Merge branch 'fix-current' into refs/top-bases/fix-branch 2010-06-29 14:41:14 -07:00
Brian Behlendorf 92b4f42d0f Merge commit 'refs/top-bases/fix-current' into fix-current 2010-06-29 14:41:14 -07:00
Brian Behlendorf f41eaa2d5c Merge branch 'fix-error-handling' into refs/top-bases/fix-branch 2010-06-29 14:41:12 -07:00
Brian Behlendorf 0f77e365da Merge commit 'refs/top-bases/fix-error-handling' into fix-error-handling 2010-06-29 14:41:12 -07:00
Brian Behlendorf 1c7f88de99 Merge branch 'fix-acl' into refs/top-bases/fix-branch 2010-06-29 14:41:11 -07:00
Brian Behlendorf 07e889a8bd Merge commit 'refs/top-bases/fix-acl' into fix-acl 2010-06-29 14:41:10 -07:00
Brian Behlendorf 480e61b674 Merge branch 'fix-deadcode' into refs/top-bases/fix-branch 2010-06-29 14:41:09 -07:00
Brian Behlendorf 89e867fd9b Merge commit 'refs/top-bases/fix-deadcode' into fix-deadcode 2010-06-29 14:41:09 -07:00
Brian Behlendorf 46f99d60e8 Merge branch 'fix-strncat' into refs/top-bases/fix-branch 2010-06-29 14:41:07 -07:00
Brian Behlendorf 9f34bbfb4e Merge commit 'refs/top-bases/fix-strncat' into fix-strncat 2010-06-29 14:41:07 -07:00
Brian Behlendorf bd4bf0dd24 Merge branch 'fix-list' into refs/top-bases/fix-branch 2010-06-29 14:41:06 -07:00
Brian Behlendorf 96332e2f86 Merge commit 'refs/top-bases/fix-list' into fix-list 2010-06-29 14:41:05 -07:00
Brian Behlendorf bc23a8b10f Merge commit 'refs/top-bases/fix-taskq' into fix-taskq 2010-06-29 14:41:03 -07:00
Brian Behlendorf 16c1ad17e9 Merge branch 'fix-taskq' into refs/top-bases/fix-branch 2010-06-29 14:41:03 -07:00
Brian Behlendorf 265513616a Merge branch 'fix-rwlocks' into refs/top-bases/fix-branch 2010-06-29 14:41:02 -07:00
Brian Behlendorf c454e517cb Merge commit 'refs/top-bases/fix-rwlocks' into fix-rwlocks 2010-06-29 14:41:01 -07:00
Brian Behlendorf a57da929fe Merge branch 'fix-no-zmod' into refs/top-bases/fix-branch 2010-06-29 14:41:00 -07:00
Brian Behlendorf 871fd7e25f Merge commit 'refs/top-bases/fix-no-zmod' into fix-no-zmod 2010-06-29 14:41:00 -07:00
Brian Behlendorf d19cd612c9 Merge branch 'fix-newlines' into refs/top-bases/fix-branch 2010-06-29 14:40:59 -07:00
Brian Behlendorf 3ba72eb48d Merge commit 'refs/top-bases/fix-newlines' into fix-newlines 2010-06-29 14:40:58 -07:00
Brian Behlendorf 3dd109c6d5 Merge branch 'fix-evict-dbufs' into refs/top-bases/fix-branch 2010-06-29 14:40:57 -07:00
Brian Behlendorf 1b6477ba12 Merge commit 'refs/top-bases/fix-evict-dbufs' into fix-evict-dbufs 2010-06-29 14:40:56 -07:00
Brian Behlendorf 158ce1ad9f Merge branch 'fix-dnode-cons' into refs/top-bases/fix-branch 2010-06-29 14:40:55 -07:00
Brian Behlendorf 0aaf6218d1 Merge commit 'refs/top-bases/fix-dnode-cons' into fix-dnode-cons 2010-06-29 14:40:55 -07:00
Brian Behlendorf 6f3fa7e640 Merge branch 'fix-dbuf_dirty_record_t' into refs/top-bases/fix-branch 2010-06-29 14:40:54 -07:00
Brian Behlendorf 8c01d40a93 Merge commit 'refs/top-bases/fix-dbuf_dirty_record_t' into fix-dbuf_dirty_record_t 2010-06-29 14:40:53 -07:00
Brian Behlendorf b3c82b1b18 Add basic README
A simple README with a short summary of the project and a link
directing people to the online documentation.
2010-06-29 14:35:21 -07:00
Brian Behlendorf 0efc05dd6f Merge branch 'fix-stack-ztest' into refs/top-bases/fix-branch 2010-06-29 11:28:36 -07:00
Brian Behlendorf ef01098ef4 Reduce stack used by ztest
While ztest does run in user space we run it with the same stack
restrictions it would have in kernel space.  This ensures that any
stack related issues which would be hit in the kernel can be caught
and debugged in user space instead.

This patch is a first pass to limit the stack usage of every ztest
function to 1024 bytes.  Subsequent updates can further reduce this
2010-06-29 11:25:08 -07:00
Brian Behlendorf 46b2d46053 Merge branch 'fix-stack-traverse_visitbp' into refs/top-bases/fix-branch 2010-06-29 11:04:51 -07:00
Brian Behlendorf 34229a2f2a Reduce stack usage for recursive traverse_visitbp()
Due to  limited stack space recursive functions are frowned upon in
the Linux kernel.  However, they often are the most elegant solution
to a problem.  The following code preserves the recursive function
traverse_visitbp() but moves the local variables AND function
arguments to the heap to minimize the stack frame size.  Enough
space is initially allocated on the stack for 20 levels of recursion.
This change does ugly-up-the-code but it reduces the worst case
usage from roughly 4160 bytes to 960 bytes on x86_64 archs.
2010-06-29 11:04:26 -07:00
Brian Behlendorf 96bd9f434d Merge branch 'fix-stack-traverse_impl' into refs/top-bases/fix-branch 2010-06-29 10:21:53 -07:00
Brian Behlendorf 8e2de85a6d Reduce stack usage of traverse_impl()
Stack use reduced from 560 bytes to 128 bytes.
2010-06-29 10:21:21 -07:00
Brian Behlendorf d2585f5921 Merge branch 'fix-stack-vn_open' into refs/top-bases/fix-branch 2010-06-29 10:15:05 -07:00
Brian Behlendorf edbb93c11d Reduce stack usage by vn_open()
We should not put a 4k maxpathlen buffer on the stack, instead
locate it to the heap.  Even in user space we run ztest with 8K
2010-06-29 10:14:37 -07:00
Brian Behlendorf 51a936233f Merge branch 'fix-stack-dsl_dataset_destroy' into refs/top-bases/fix-branch 2010-06-29 10:12:03 -07:00
Brian Behlendorf aa90238713 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2010-06-29 10:12:03 -07:00
Brian Behlendorf 7334572416 Reduce stack usage by dsl_dataset_destroy()
Move dsl_dataset_t local variable from the stack to the heap.
This reduces the stack usage of this function from 2048 bytes
to 176 bytes for x84_64 arches.
2010-06-29 10:11:32 -07:00
Brian Behlendorf 6fe1e37a5e Additional pthread related fixes for ztest
There are 3 fixes in thie commit.  First, update ztest_run() to store
the thread id and not the address of the kthread_t.  This will be freed
on thread exit and is not safe to use.  This is pretty close to how
things were done in the original ztest code before I got there.

Second, for extra paranoia update thread_exit() to return a special
TS_MAGIC value via pthread_exit().  This value is then verified in
pthread_join() to ensure the thread exited cleanly.  This can be
done cleanly because the kthread doesn't provide a return code
mechanism we need to worry about.

Third, replace the ztest deadman thread with a signal handler.  We
cannot use the previous approach because the correct behavior for
pthreads is to wait for all threads to exit before terminating the
process.  Since the deadman thread won't call exit by design we
end up hanging in kernel_exit().  To avoid this we just setup a
SIGALRM signal handle and register a deadman alarm.  IMHO this
is simpler and cleaner anyway.
2010-06-29 10:06:09 -07:00
Brian Behlendorf 8ec85f8aee Merge branch 'fix-stack-dmu_objset_snapshot' into refs/top-bases/fix-branch 2010-06-28 10:36:17 -07:00
Brian Behlendorf ee53c67258 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2010-06-28 10:36:17 -07:00