All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@vger.kernel.org
Cc: suresh.b.siddha@intel.com
Cc: corey.d.gough@intel.com
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org
Subject: [patch 03/10] SLUB: Do not use page->mapping
Date: Sat, 07 Jul 2007 20:49:55 -0700	[thread overview]
Message-ID: <20070708035016.643212528@sgi.com> (raw)
In-Reply-To: 20070708034952.022985379@sgi.com

[-- Attachment #1: slub_free_up_mapping --]
[-- Type: text/plain, Size: 2699 bytes --]

After moving the lockless_freelist to kmem_cache_cpu we no longer need
page->lockless_freelist. Restructure the use of the struct page fields in
such a way that we never touch the mapping field.

This is turn allows us to remove the special casing of SLUB when determining
the mapping of a page (needed for corner cases of virtual caches machines that
need to flush caches of processors mapping a page).

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 include/linux/mm.h       |    4 ----
 include/linux/mm_types.h |    9 ++-------
 mm/slub.c                |    2 --
 3 files changed, 2 insertions(+), 13 deletions(-)

Index: linux-2.6.22-rc6-mm1/include/linux/mm.h
===================================================================
--- linux-2.6.22-rc6-mm1.orig/include/linux/mm.h	2007-07-05 19:05:02.000000000 -0700
+++ linux-2.6.22-rc6-mm1/include/linux/mm.h	2007-07-05 19:05:24.000000000 -0700
@@ -632,10 +632,6 @@ static inline struct address_space *page
 	VM_BUG_ON(PageSlab(page));
 	if (unlikely(PageSwapCache(page)))
 		mapping = &swapper_space;
-#ifdef CONFIG_SLUB
-	else if (unlikely(PageSlab(page)))
-		mapping = NULL;
-#endif
 	else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
 		mapping = NULL;
 	return mapping;
Index: linux-2.6.22-rc6-mm1/include/linux/mm_types.h
===================================================================
--- linux-2.6.22-rc6-mm1.orig/include/linux/mm_types.h	2007-07-05 19:00:19.000000000 -0700
+++ linux-2.6.22-rc6-mm1/include/linux/mm_types.h	2007-07-05 19:05:24.000000000 -0700
@@ -49,13 +49,8 @@ struct page {
 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
 	    spinlock_t ptl;
 #endif
-	    struct {			/* SLUB uses */
-	    	void **lockless_freelist;
-		struct kmem_cache *slab;	/* Pointer to slab */
-	    };
-	    struct {
-		struct page *first_page;	/* Compound pages */
-	    };
+	    struct kmem_cache *slab;	/* SLUB: Pointer to slab */
+	    struct page *first_page;	/* Compound tail pages */
 	};
 	union {
 		pgoff_t index;		/* Our offset within mapping. */
Index: linux-2.6.22-rc6-mm1/mm/slub.c
===================================================================
--- linux-2.6.22-rc6-mm1.orig/mm/slub.c	2007-07-05 19:05:16.000000000 -0700
+++ linux-2.6.22-rc6-mm1/mm/slub.c	2007-07-05 19:05:24.000000000 -0700
@@ -1109,7 +1109,6 @@ static struct page *new_slab(struct kmem
 		atomic_long_inc(&n->nr_slabs);
 
 	page->inuse = 0;
-	page->lockless_freelist = NULL;
 	page->offset = s->offset / sizeof(void *);
 	page->slab = s;
 
@@ -1163,7 +1162,6 @@ static void __free_slab(struct kmem_cach
 		NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE,
 		- pages);
 
-	page->mapping = NULL;
 	__free_pages(page, s->order);
 }
 

-- 

  parent reply	other threads:[~2007-07-08  3:50 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08  3:49 [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance Christoph Lameter
2007-07-08  3:49 ` [patch 01/10] SLUB: Direct pass through of page size or higher kmalloc requests Christoph Lameter
2007-07-08  3:49 ` [patch 02/10] SLUB: Avoid page struct cacheline bouncing due to remote frees to cpu slab Christoph Lameter
2007-07-08  3:49 ` Christoph Lameter [this message]
2007-07-08  3:49 ` [patch 04/10] SLUB: Move page->offset to kmem_cache_cpu->offset Christoph Lameter
2007-07-08  3:49 ` [patch 05/10] SLUB: Avoid touching page struct when freeing to per cpu slab Christoph Lameter
2007-07-08  3:49 ` [patch 06/10] SLUB: Place kmem_cache_cpu structures in a NUMA aware way Christoph Lameter
2007-07-08  3:49 ` [patch 07/10] SLUB: Optimize cacheline use for zeroing Christoph Lameter
2007-07-08  3:50 ` [patch 08/10] SLUB: Single atomic instruction alloc/free using cmpxchg Christoph Lameter
2007-07-08  3:50 ` [patch 09/10] Remove the SLOB allocator for 2.6.23 Christoph Lameter
2007-07-08  7:51   ` Ingo Molnar
2007-07-08  9:43     ` Nick Piggin
2007-07-08  9:54       ` Ingo Molnar
2007-07-08 10:23         ` Nick Piggin
2007-07-08 10:42           ` Ingo Molnar
2007-07-08 18:02     ` Andrew Morton
2007-07-09  2:57       ` Nick Piggin
2007-07-09 11:04         ` Pekka Enberg
2007-07-09 11:16           ` Nick Piggin
2007-07-09 12:47             ` Pekka Enberg
2007-07-09 13:46             ` Pekka J Enberg
2007-07-09 16:08           ` Christoph Lameter
2007-07-09 16:08             ` Christoph Lameter
2007-07-10  8:17             ` Pekka J Enberg
2007-07-10  8:17               ` Pekka J Enberg
2007-07-10  8:27               ` Nick Piggin
2007-07-10  8:27                 ` Nick Piggin
2007-07-10  9:31                 ` Pekka Enberg
2007-07-10  9:31                   ` Pekka Enberg
2007-07-10 10:09                   ` Nick Piggin
2007-07-10 10:09                     ` Nick Piggin
2007-07-10 12:02                   ` Matt Mackall
2007-07-10 12:02                     ` Matt Mackall
2007-07-10 12:57                     ` Pekka J Enberg
2007-07-10 12:57                       ` Pekka J Enberg
2007-07-10 22:12                     ` Christoph Lameter
2007-07-10 22:40                       ` Matt Mackall
2007-07-10 22:40                         ` Matt Mackall
2007-07-10 22:50                         ` Christoph Lameter
2007-07-10 22:50                           ` Christoph Lameter
2007-07-09 16:06         ` Christoph Lameter
2007-07-09 16:51           ` Andrew Morton
2007-07-09 17:26             ` Christoph Lameter
2007-07-09 18:00               ` Andrew Morton
2007-07-10  1:43               ` Nick Piggin
2007-07-10  1:56                 ` Christoph Lameter
2007-07-10  2:02                   ` Nick Piggin
2007-07-10  2:11                     ` Christoph Lameter
2007-07-10  7:09                       ` Nick Piggin
2007-07-10 22:09                         ` Christoph Lameter
2007-07-10 23:12                           ` Matt Mackall
2007-07-10  8:32                       ` Matt Mackall
2007-07-10  9:01                         ` Håvard Skinnemoen
2007-07-10  9:11                           ` Nick Piggin
2007-07-10  9:21                             ` Håvard Skinnemoen
2007-07-11  1:37                         ` Christoph Lameter
2007-07-11  2:06                           ` Matt Mackall
2007-07-11 18:06                             ` Christoph Lameter
2007-07-11 18:25                               ` Pekka J Enberg
2007-07-11 18:33                                 ` Christoph Lameter
2007-07-11 18:36                                   ` Pekka J Enberg
2007-07-12  0:33                                 ` Nick Piggin
2007-07-09 23:09             ` Matt Mackall
2007-07-10  1:41           ` Nick Piggin
2007-07-10  1:51             ` Christoph Lameter
2007-07-10  1:58               ` Nick Piggin
2007-07-10  6:22                 ` Matt Mackall
2007-07-10  7:03                   ` Nick Piggin
2007-07-10  2:32               ` Matt Mackall
2007-07-09 21:57       ` Matt Mackall
2007-07-09 12:31     ` Matthieu CASTET
2007-07-09 16:00     ` Christoph Lameter
2007-07-09 20:52   ` Matt Mackall
2007-07-08  3:50 ` [patch 10/10] Remove slab in 2.6.24 Christoph Lameter
2007-07-08  4:37 ` [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance David Miller
2007-07-09 15:45   ` Christoph Lameter
2007-07-09 19:43     ` David Miller
2007-07-09 21:21       ` Christoph Lameter
2007-07-08 11:20 ` Andi Kleen
2007-07-09 15:50   ` Christoph Lameter
2007-07-09 15:50     ` Christoph Lameter
2007-07-09 15:59     ` Martin Bligh
2007-07-09 15:59       ` Martin Bligh
2007-07-09 18:11       ` Christoph Lameter
2007-07-09 18:11         ` Christoph Lameter
2007-07-09 21:00         ` Martin Bligh
2007-07-09 21:00           ` Martin Bligh
2007-07-09 21:44           ` Mathieu Desnoyers
2007-07-09 21:44             ` Mathieu Desnoyers
2007-07-09 21:55             ` Christoph Lameter
2007-07-09 21:55               ` Christoph Lameter
2007-07-09 22:58               ` Mathieu Desnoyers
2007-07-09 22:58                 ` Mathieu Desnoyers
2007-07-09 23:08                 ` Christoph Lameter
2007-07-09 23:08                   ` Christoph Lameter
2007-07-10  5:16                   ` [PATCH] x86_64 - Use non locked version for local_cmpxchg() Mathieu Desnoyers
2007-07-10  5:16                     ` Mathieu Desnoyers
2007-07-10 20:46                     ` Christoph Lameter
2007-07-10 20:46                       ` Christoph Lameter
2007-07-10  0:55                 ` [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance Christoph Lameter
2007-07-10  0:55                   ` Christoph Lameter
2007-07-10  8:27                   ` Mathieu Desnoyers
2007-07-10  8:27                     ` Mathieu Desnoyers
2007-07-10 18:38                     ` Christoph Lameter
2007-07-10 18:38                       ` Christoph Lameter
2007-07-10 20:59                     ` Mathieu Desnoyers
2007-07-10 20:59                       ` Mathieu Desnoyers
2007-08-13 22:18                   ` Mathieu Desnoyers
2007-08-13 22:18                     ` Mathieu Desnoyers
2007-08-13 22:28                     ` Christoph Lameter
2007-08-13 22:28                       ` Christoph Lameter

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=20070708035016.643212528@sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@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 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.