Re: [dm-devel] Re: [PATCH resubmit] do_mount: reduce stack consumption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton wrote:
Neil Brown <[email protected]> wrote:

...
Reduce stack usage with stacked block devices

...
diff ./include/linux/sched.h~current~ ./include/linux/sched.h
--- ./include/linux/sched.h~current~	2005-11-07 10:01:36.000000000 +1100
+++ ./include/linux/sched.h	2005-11-07 10:02:23.000000000 +1100
@@ -829,6 +829,9 @@ struct task_struct {
/* journalling filesystem info */
	void *journal_info;

+/* stacked block device info */
+	struct bio *bio_list, **bio_tail;
+
/* VM state */
	struct reclaim_state *reclaim_state;



More state in the task_strut is a bit sad, but not nearly as sad as deep
recursion in our deepest codepath..

Possibly one could do:

struct make_request_state {
	struct bio *bio_list;
	struct bio **bio_tail;
};

and stick a `struct make_request_state *' into the task_struct and actually
allocate the thing on the stack.  That's not much nicer though.

Possibly it could go into struct io_context?

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux