mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Neil Brown <neilb@suse.de>
Cc: nickpiggin@yahoo.com.au, dm-devel@redhat.com,
	heiko.carstens@de.ibm.com, linux-kernel@vger.kernel.org,
	aherrman@de.ibm.com, bunk@stusta.de, cplk@itee.uq.edu.au
Subject: Re: [dm-devel] Re: [PATCH resubmit] do_mount: reduce stack consumption
Date: Mon, 7 Nov 2005 17:15:07 -0800	[thread overview]
Message-ID: <20051107171507.0b0dc83a.akpm@osdl.org> (raw)
In-Reply-To: <17263.63845.556511.171582@cse.unsw.edu.au>

Neil Brown <neilb@suse.de> wrote:
>
> On Tuesday November 8, nickpiggin@yahoo.com.au wrote:
> > Andrew Morton wrote:
> > > 
> > > 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?
> > 
> 
> My quick reading of the code says that we could have to 
> allocate the struct right there in generic_make_request, and I don't
> think we can be certain that such an allocation will succeed.

With this sort of lifecycle it's more appropriat to allocate the struct on
the stack and to put a pointer to it into task_struct.

> Code that uses io_context can limp along if it doesn't exist.  
> The new generic_make_request needs this bio_list to be present 
> or it cannot do it's job.
> 
> Just how tight are we for space in task_struct?

I don't recall anyone getting outraged about it.

>  It seems to have a
> fair amount of cruft in it.

yup.

> Is it getting close to one-page or something?

1280 bytes on my x86

> Can we just split the less interesting stuff up into a separate
> structure, allocate a separate page for that are fork time, and leave 
> just a pointer in the task_struct?

Something like that, if it becomes a problem.

Probably there are various deporking opportunities in there.

  reply	other threads:[~2005-11-08  1:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04 10:50 Heiko Carstens
2005-11-04 11:48 ` Al Viro
2005-11-04 12:57   ` Heiko Carstens
2005-11-04 14:06     ` Al Viro
2005-11-04 22:03       ` Heiko Carstens
2005-11-04 16:48 ` Andrew Morton
2005-11-04 21:27   ` Heiko Carstens
2005-11-04 23:55     ` Adrian Bunk
2005-11-05  0:08       ` Andrew Morton
2005-11-05  1:15         ` cplk
2005-11-05  1:37           ` Andrew Morton
2005-11-05  5:37             ` Neil Brown
2005-11-07  0:16               ` [dm-devel] " Neil Brown
2005-11-07 16:15                 ` Heiko Carstens
2005-11-07 22:12                   ` Neil Brown
2005-11-07 23:37                 ` Andrew Morton
2005-11-08  0:32                   ` Nick Piggin
2005-11-08  1:03                     ` Neil Brown
2005-11-08  1:15                       ` Andrew Morton [this message]
2005-11-08  1:37                       ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051107171507.0b0dc83a.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=aherrman@de.ibm.com \
    --cc=bunk@stusta.de \
    --cc=cplk@itee.uq.edu.au \
    --cc=dm-devel@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome