From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Andi Kleen <ak@suse.de>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] trim unused functions
Date: Fri, 18 Feb 2005 02:40:16 +1100 [thread overview]
Message-ID: <4214BAE0.1000500@yahoo.com.au> (raw)
In-Reply-To: <4214BA18.50604@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 95 bytes --]
And lastly, redo this vital optimisation that David
had to remove earlier. Saves a few bytes.
[-- Attachment #2: vm-trim-unused.patch --]
[-- Type: text/plain, Size: 2206 bytes --]
---
linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h | 2 ++
linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h | 2 ++
linux-2.6-npiggin/mm/memory.c | 8 +++++++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff -puN include/asm-generic/pgtable-nopud.h~vm-trim-unused include/asm-generic/pgtable-nopud.h
--- linux-2.6/include/asm-generic/pgtable-nopud.h~vm-trim-unused 2005-02-18 02:14:30.000000000 +1100
+++ linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h 2005-02-18 02:15:41.000000000 +1100
@@ -3,6 +3,8 @@
#ifndef __ASSEMBLY__
+#define __PAGETABLE_PUD_FOLDED
+
/*
* Having the pud type consist of a pgd gets the size right, and allows
* us to conceptually access the pgd entry that this pud is folded into
diff -puN include/asm-generic/pgtable-nopmd.h~vm-trim-unused include/asm-generic/pgtable-nopmd.h
--- linux-2.6/include/asm-generic/pgtable-nopmd.h~vm-trim-unused 2005-02-18 02:14:32.000000000 +1100
+++ linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h 2005-02-18 02:15:31.000000000 +1100
@@ -5,6 +5,8 @@
#include <asm-generic/pgtable-nopud.h>
+#define __PAGETABLE_PMD_FOLDED
+
/*
* Having the pmd type consist of a pud gets the size right, and allows
* us to conceptually access the pud entry that this pmd is folded into
diff -puN mm/memory.c~vm-trim-unused mm/memory.c
--- linux-2.6/mm/memory.c~vm-trim-unused 2005-02-18 02:14:44.000000000 +1100
+++ linux-2.6-npiggin/mm/memory.c 2005-02-18 02:17:34.000000000 +1100
@@ -2006,6 +2006,8 @@ int handle_mm_fault(struct mm_struct *mm
}
#ifndef __ARCH_HAS_4LEVEL_HACK
+
+#ifndef __PAGETABLE_PUD_FOLDED
/*
* Allocate page upper directory.
*
@@ -2037,7 +2039,9 @@ pud_t fastcall *__pud_alloc(struct mm_st
out:
return pud_offset(pgd, address);
}
+#endif /* __PAGETABLE_PUD_FOLDED */
+#ifndef __PAGETABLE_PMD_FOLDED
/*
* Allocate page middle directory.
*
@@ -2069,7 +2073,9 @@ pmd_t fastcall *__pmd_alloc(struct mm_st
out:
return pmd_offset(pud, address);
}
-#else
+#endif /* __PAGETABLE_PMD_FOLDED */
+
+#else /* __ARCH_HAS_4LEVEL_HACK */
pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
{
pmd_t *new;
_
prev parent reply other threads:[~2005-02-17 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-17 15:36 [PATCH 1/2] folded page table walkers Nick Piggin
2005-02-17 15:40 ` Nick Piggin [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=4214BAE0.1000500@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.