From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linux Memory Management <linux-mm@kvack.org>
Cc: Andi Kleen <ak@suse.de>, Hugh Dickins <hugh@veritas.com>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH 10/10] alternate 4-level page tables patches
Date: Sat, 18 Dec 2004 18:01:05 +1100 [thread overview]
Message-ID: <41C3D5B1.3040200@yahoo.com.au> (raw)
In-Reply-To: <41C3D594.4020108@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 6 bytes --]
10/10
[-- Attachment #2: mm-inline-ptbl-walkers.patch --]
[-- Type: text/plain, Size: 5888 bytes --]
Convert some pagetable walking functions over to be inline where
they are only used once. This is worth a percent or so on lmbench
fork.
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
---
linux-2.6-npiggin/mm/memory.c | 8 ++++----
linux-2.6-npiggin/mm/msync.c | 4 ++--
linux-2.6-npiggin/mm/swapfile.c | 6 +++---
linux-2.6-npiggin/mm/vmalloc.c | 12 ++++++------
4 files changed, 15 insertions(+), 15 deletions(-)
diff -puN mm/memory.c~mm-inline-ptbl-walkers mm/memory.c
--- linux-2.6/mm/memory.c~mm-inline-ptbl-walkers 2004-12-18 17:47:33.000000000 +1100
+++ linux-2.6-npiggin/mm/memory.c 2004-12-18 17:48:14.000000000 +1100
@@ -462,7 +462,7 @@ int copy_page_range(struct mm_struct *ds
return err;
}
-static void zap_pte_range(struct mmu_gather *tlb,
+static inline void zap_pte_range(struct mmu_gather *tlb,
pmd_t *pmd, unsigned long address,
unsigned long size, struct zap_details *details)
{
@@ -545,7 +545,7 @@ static void zap_pte_range(struct mmu_gat
pte_unmap(ptep-1);
}
-static void zap_pmd_range(struct mmu_gather *tlb,
+static inline void zap_pmd_range(struct mmu_gather *tlb,
pud_t *pud, unsigned long address,
unsigned long size, struct zap_details *details)
{
@@ -570,7 +570,7 @@ static void zap_pmd_range(struct mmu_gat
} while (address && (address < end));
}
-static void zap_pud_range(struct mmu_gather *tlb,
+static inline void zap_pud_range(struct mmu_gather *tlb,
pgd_t * pgd, unsigned long address,
unsigned long end, struct zap_details *details)
{
@@ -973,7 +973,7 @@ out:
EXPORT_SYMBOL(get_user_pages);
-static void zeromap_pte_range(pte_t * pte, unsigned long address,
+static inline void zeromap_pte_range(pte_t * pte, unsigned long address,
unsigned long size, pgprot_t prot)
{
unsigned long end;
diff -puN mm/msync.c~mm-inline-ptbl-walkers mm/msync.c
--- linux-2.6/mm/msync.c~mm-inline-ptbl-walkers 2004-12-18 17:47:33.000000000 +1100
+++ linux-2.6-npiggin/mm/msync.c 2004-12-18 17:47:33.000000000 +1100
@@ -21,7 +21,7 @@
* Called with mm->page_table_lock held to protect against other
* threads/the swapper from ripping pte's out from under us.
*/
-static int filemap_sync_pte(pte_t *ptep, struct vm_area_struct *vma,
+static inline int filemap_sync_pte(pte_t *ptep, struct vm_area_struct *vma,
unsigned long address, unsigned int flags)
{
pte_t pte = *ptep;
@@ -38,7 +38,7 @@ static int filemap_sync_pte(pte_t *ptep,
return 0;
}
-static int filemap_sync_pte_range(pmd_t * pmd,
+static inline int filemap_sync_pte_range(pmd_t * pmd,
unsigned long address, unsigned long end,
struct vm_area_struct *vma, unsigned int flags)
{
diff -puN mm/swapfile.c~mm-inline-ptbl-walkers mm/swapfile.c
--- linux-2.6/mm/swapfile.c~mm-inline-ptbl-walkers 2004-12-18 17:47:33.000000000 +1100
+++ linux-2.6-npiggin/mm/swapfile.c 2004-12-18 17:47:33.000000000 +1100
@@ -427,7 +427,7 @@ void free_swap_and_cache(swp_entry_t ent
* what to do if a write is requested later.
*/
/* vma->vm_mm->page_table_lock is held */
-static void
+static inline void
unuse_pte(struct vm_area_struct *vma, unsigned long address, pte_t *dir,
swp_entry_t entry, struct page *page)
{
@@ -439,7 +439,7 @@ unuse_pte(struct vm_area_struct *vma, un
}
/* vma->vm_mm->page_table_lock is held */
-static unsigned long unuse_pmd(struct vm_area_struct * vma, pmd_t *dir,
+static inline unsigned long unuse_pmd(struct vm_area_struct * vma, pmd_t *dir,
unsigned long address, unsigned long size, unsigned long offset,
swp_entry_t entry, struct page *page)
{
@@ -486,7 +486,7 @@ static unsigned long unuse_pmd(struct vm
}
/* vma->vm_mm->page_table_lock is held */
-static unsigned long unuse_pud(struct vm_area_struct * vma, pud_t *pud,
+static inline unsigned long unuse_pud(struct vm_area_struct * vma, pud_t *pud,
unsigned long address, unsigned long size, unsigned long offset,
swp_entry_t entry, struct page *page)
{
diff -puN mm/vmalloc.c~mm-inline-ptbl-walkers mm/vmalloc.c
--- linux-2.6/mm/vmalloc.c~mm-inline-ptbl-walkers 2004-12-18 17:47:33.000000000 +1100
+++ linux-2.6-npiggin/mm/vmalloc.c 2004-12-18 17:47:33.000000000 +1100
@@ -23,7 +23,7 @@
rwlock_t vmlist_lock = RW_LOCK_UNLOCKED;
struct vm_struct *vmlist;
-static void unmap_area_pte(pmd_t *pmd, unsigned long address,
+static inline void unmap_area_pte(pmd_t *pmd, unsigned long address,
unsigned long size)
{
unsigned long end;
@@ -56,7 +56,7 @@ static void unmap_area_pte(pmd_t *pmd, u
} while (address < end);
}
-static void unmap_area_pmd(pud_t *pud, unsigned long address,
+static inline void unmap_area_pmd(pud_t *pud, unsigned long address,
unsigned long size)
{
unsigned long end;
@@ -83,7 +83,7 @@ static void unmap_area_pmd(pud_t *pud, u
} while (address < end);
}
-static void unmap_area_pud(pgd_t *pgd, unsigned long address,
+static inline void unmap_area_pud(pgd_t *pgd, unsigned long address,
unsigned long size)
{
pud_t *pud;
@@ -110,7 +110,7 @@ static void unmap_area_pud(pgd_t *pgd, u
} while (address && (address < end));
}
-static int map_area_pte(pte_t *pte, unsigned long address,
+static inline int map_area_pte(pte_t *pte, unsigned long address,
unsigned long size, pgprot_t prot,
struct page ***pages)
{
@@ -135,7 +135,7 @@ static int map_area_pte(pte_t *pte, unsi
return 0;
}
-static int map_area_pmd(pmd_t *pmd, unsigned long address,
+static inline int map_area_pmd(pmd_t *pmd, unsigned long address,
unsigned long size, pgprot_t prot,
struct page ***pages)
{
@@ -160,7 +160,7 @@ static int map_area_pmd(pmd_t *pmd, unsi
return 0;
}
-static int map_area_pud(pud_t *pud, unsigned long address,
+static inline int map_area_pud(pud_t *pud, unsigned long address,
unsigned long end, pgprot_t prot,
struct page ***pages)
{
_
next prev parent reply other threads:[~2004-12-18 7:01 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-18 6:55 [RFC][PATCH 0/10] alternate 4-level page tables patches Nick Piggin
2004-12-18 6:55 ` [PATCH 1/10] " Nick Piggin
2004-12-18 6:56 ` [PATCH 2/10] " Nick Piggin
2004-12-18 6:56 ` [PATCH 3/10] " Nick Piggin
2004-12-18 6:57 ` [PATCH 4/10] " Nick Piggin
2004-12-18 6:58 ` [PATCH 5/10] " Nick Piggin
2004-12-18 6:58 ` [PATCH 6/10] " Nick Piggin
2004-12-18 6:59 ` [PATCH 7/10] " Nick Piggin
2004-12-18 7:00 ` [PATCH 8/10] " Nick Piggin
2004-12-18 7:00 ` [PATCH 9/10] " Nick Piggin
2004-12-18 7:01 ` Nick Piggin [this message]
2004-12-18 7:31 ` [PATCH 10/10] " Andi Kleen
2004-12-18 7:46 ` Nick Piggin
2004-12-18 8:08 ` Andrew Morton
2004-12-18 9:48 ` Andi Kleen
2004-12-18 19:06 ` Linus Torvalds
2004-12-20 17:43 ` Andi Kleen
2004-12-20 17:47 ` Randy.Dunlap
2004-12-20 18:08 ` Linus Torvalds
2004-12-20 18:15 ` Linus Torvalds
2004-12-20 18:19 ` Andi Kleen
2004-12-20 18:47 ` Linus Torvalds
2004-12-20 18:52 ` Linus Torvalds
2004-12-20 18:59 ` Andi Kleen
2004-12-20 18:57 ` Randy.Dunlap
2004-12-18 9:05 ` [PATCH 4/10] " Nick Piggin
2004-12-18 9:50 ` Andi Kleen
2004-12-18 10:06 ` Nick Piggin
2004-12-18 10:11 ` Andi Kleen
2004-12-18 10:22 ` Nick Piggin
2004-12-18 10:29 ` Nick Piggin
2004-12-18 11:06 ` William Lee Irwin III
2004-12-18 11:17 ` Nick Piggin
2004-12-18 11:32 ` William Lee Irwin III
2004-12-18 11:55 ` Nick Piggin
2004-12-18 12:46 ` William Lee Irwin III
2004-12-18 12:48 ` William Lee Irwin III
2004-12-19 0:05 ` Nick Piggin
2004-12-19 0:20 ` William Lee Irwin III
2004-12-19 0:38 ` Nick Piggin
2004-12-19 1:01 ` William Lee Irwin III
2004-12-19 1:31 ` Linus Torvalds
2004-12-19 2:08 ` William Lee Irwin III
2004-12-19 2:26 ` Nick Piggin
2004-12-19 5:23 ` Linus Torvalds
2004-12-19 6:02 ` William Lee Irwin III
2004-12-19 18:17 ` Linus Torvalds
2004-12-20 1:00 ` William Lee Irwin III
2004-12-18 10:45 ` William Lee Irwin III
2004-12-18 10:58 ` Nick Piggin
2004-12-19 0:07 ` [RFC][PATCH 0/10] " Hugh Dickins
2004-12-19 0:33 ` Nick Piggin
2004-12-20 18:04 ` Andi Kleen
2004-12-20 18:40 ` Linus Torvalds
2004-12-20 18:53 ` Andi Kleen
2004-12-21 0:04 ` Linus Torvalds
2004-12-21 0:22 ` Andi Kleen
2004-12-21 0:43 ` Linus Torvalds
2004-12-21 0:47 ` Nick Piggin
2004-12-21 2:55 ` Hugh Dickins
2004-12-21 3:21 ` Nick Piggin
2004-12-21 3:47 ` Linus Torvalds
2004-12-21 3:56 ` Linus Torvalds
2004-12-21 4:04 ` Nick Piggin
2004-12-21 4:08 ` Nick Piggin
2004-12-21 9:36 ` Andi Kleen
2004-12-21 10:13 ` Hugh Dickins
2004-12-21 10:59 ` Nick Piggin
2004-12-21 17:36 ` Linus Torvalds
2004-12-21 20:19 ` Andi Kleen
2004-12-21 23:49 ` Nick Piggin
2004-12-22 10:38 ` Andi Kleen
2004-12-22 11:19 ` Nick Piggin
2004-12-22 11:23 ` Nick Piggin
2004-12-22 18:07 ` Andi Kleen
2004-12-30 21:24 ` Nick Piggin
2004-12-21 10:52 ` Nick Piggin
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=41C3D5B1.3040200@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.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.