Re: [patch 4/19] stack space reduction (remove MAX_BUF_PER_PAGE)

From: Linus Torvalds (torvalds@transmeta.com)
Date: Tue Jun 18 2002 - 12:08:36 EST


On Mon, 17 Jun 2002, Andrew Morton wrote:
> Andrew Morton wrote:
> >
> > ..
> > + do {
> > + if (buffer_async_read(bh))
> > + submit_bh(READ, bh);
> > + } while ((bh = bh->b_this_page) != head);
>
> That's a bug.

I'm just not going to apply this patch.

Right now MAX_BUFFERS_PER_PAGE is 8 or 16, and the array of buffer heads
is thus 32 bytes on an x86. I'd much rather get a nice tight loop without
callbacks in the middle, and then submit 8 pre-approved buffers in one go,
than have issues like this.

If we have 64kB pages, such architectures will have to have a bigger
kernel stack. Which they will have, simply by virtue of having the very
same bigger page. So that problem kind of solves itself.

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:16 EST