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 14:11:06 -0700 [thread overview]
Message-ID: <20040608141106.3c7c3c10.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0406082144070.9094-100000@localhost.localdomain>
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:
The ____cacheline_aligned in there is a leftover from before the existence of
the percpu infrastructure. It bloats struct page_state and structures which
contain it enormously, and we use these things on the stack deep in page
reclaim.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/include/linux/page-flags.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN include/linux/page-flags.h~unalign-page_state include/linux/page-flags.h
--- 25/include/linux/page-flags.h~unalign-page_state 2004-06-08 03:08:02.766976760 -0700
+++ 25-akpm/include/linux/page-flags.h 2004-06-08 03:08:02.769976304 -0700
@@ -133,7 +133,7 @@ struct page_state {
unsigned long allocstall; /* direct reclaim calls */
unsigned long pgrotated; /* pages rotated to tail of the LRU */
-} ____cacheline_aligned;
+};
DECLARE_PER_CPU(struct page_state, page_states);
_
next prev parent reply other threads:[~2004-06-08 21:08 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 [this message]
2004-06-08 22:34 ` Hugh Dickins
2004-06-08 22:54 ` Andrew Morton
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=20040608141106.3c7c3c10.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®