[lkml]   [2004]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] stop page_state stack waste
Hugh Dickins <> 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
Signed-off-by: Andrew Morton <>
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);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean