From: Brian Behlendorf Date: Mon, 10 Dec 2012 23:27:05 +0000 (-0800) Subject: splat taskq:front: Reduce stack frame X-Git-Tag: spl-0.6.0-rc13~5^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5a98e72605c071f94b9fdc4bf1811f8ed8d7f32;p=spl splat taskq:front: Reduce stack frame The slightly increased size of the taskq_ent_t when debugging is enabled has pushed the taskq:front splat test over frame size limit. To resolve this dynamically allocate the taskq_ent_t structures so they are part of the heap instead of the stack. In function 'splat_taskq_test6_impl' error: the frame size of 1648 bytes is larger than 1024 bytes Signed-off-by: Brian Behlendorf --- diff --git a/module/splat/splat-taskq.c b/module/splat/splat-taskq.c index f05d1c0..5a9681e 100644 --- a/module/splat/splat-taskq.c +++ b/module/splat/splat-taskq.c @@ -828,10 +828,13 @@ splat_taskq_test6_impl(struct file *file, void *arg, boolean_t prealloc) splat_taskq_id_t tq_id[SPLAT_TASKQ_ORDER_MAX]; splat_taskq_arg_t tq_arg; int order[SPLAT_TASKQ_ORDER_MAX] = { 1,2,3,6,7,8,4,5 }; - taskq_ent_t tqes[SPLAT_TASKQ_ORDER_MAX]; + taskq_ent_t *tqes; int i, rc = 0; uint_t tflags; + tqes = kmem_alloc(sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX, KM_SLEEP); + memset(tqes, 0, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + splat_vprint(file, SPLAT_TASKQ_TEST6_NAME, "Taskq '%s' creating (%s dispatch)\n", SPLAT_TASKQ_TEST6_NAME, @@ -899,6 +902,8 @@ out: "Taskq '%s' destroying\n", tq_arg.name); taskq_destroy(tq); + kmem_free(tqes, sizeof(*tqes) * SPLAT_TASKQ_ORDER_MAX); + return rc; }