mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: arjanv@redhat.com, joern@wohnheim.fh-wedel.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stop page_state stack waste
Date: Tue, 8 Jun 2004 15:54:58 -0700	[thread overview]
Message-ID: <20040608155458.11b4d5df.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0406082331470.2556-100000@localhost.localdomain>

Hugh Dickins <hugh@veritas.com> wrote:
>
> On Tue, 8 Jun 2004, Andrew Morton wrote:
> > Hugh Dickins <hugh@veritas.com> wrote:
> > >
> > > Replace get_page_state (which memset most of full page_state to 0) by
> > > get_main_page_state, which just sets the small structure needed.  This
> > > helps 4k stacks not to overflow: cuts 224 bytes off try_to_free_pages
> > > and wakeup_bdflush (and sync_inodes_sb) stack usages: wakeup_bdflush
> > > doesn't do much, but is called by try_to_free_pages and mempool_alloc.
> > 
> > Yeah, I was looking at that.  I simply did:
> > -} ____cacheline_aligned;
> > +};
> 
> Well, that is a smaller patch; but you're still wasting 124 bytes of
> stack in wakeup_bdflush below 124 bytes wasted in try_to_free_pages.
> 

yup, but that's better than 256+256, or 512+256 in -mm.

Your patch was kinda icky.  I think it would be better to remove those
page_state variables altogether and use something along the lines of

unsigned long __read_page_state(unsigned offset);
#define read_page_state(var) __read_page_state(offsetof(page_states, var))

I'll cook something up...

      reply	other threads:[~2004-06-08 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08 20:51 Hugh Dickins
2004-06-08 21:11 ` Andrew Morton
2004-06-08 22:34   ` Hugh Dickins
2004-06-08 22:54     ` Andrew Morton [this message]

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=20040608155458.11b4d5df.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=hugh@veritas.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®