- change-gen_pool-allocator-to-not-touch-managed-memory-update.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     change gen_pool allocator to not touch managed memory (update)

has been removed from the -mm tree.  Its filename is

     change-gen_pool-allocator-to-not-touch-managed-memory-update.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: change gen_pool allocator to not touch managed memory (update)
From: Dean Nelson <dcn@xxxxxxx>


Cc: Andrey Volkov <avolkov@xxxxxxxxxxxx>
Cc: Jes Sorensen <jes@xxxxxxxxxxxxxxxxxx>
Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/genalloc.h |    3 ---
 lib/genalloc.c           |   25 +++++++------------------
 2 files changed, 7 insertions(+), 21 deletions(-)

diff -puN include/linux/genalloc.h~change-gen_pool-allocator-to-not-touch-managed-memory-update include/linux/genalloc.h
--- 25/include/linux/genalloc.h~change-gen_pool-allocator-to-not-touch-managed-memory-update	Wed Apr 26 14:19:24 2006
+++ 25-akpm/include/linux/genalloc.h	Wed Apr 26 14:19:24 2006
@@ -9,9 +9,6 @@
  */
 
 
-#define GENALLOC_NID_NONE	-1
-
-
 /*
  *  General purpose special memory pool descriptor.
  */
diff -puN lib/genalloc.c~change-gen_pool-allocator-to-not-touch-managed-memory-update lib/genalloc.c
--- 25/lib/genalloc.c~change-gen_pool-allocator-to-not-touch-managed-memory-update	Wed Apr 26 14:19:24 2006
+++ 25-akpm/lib/genalloc.c	Wed Apr 26 14:19:24 2006
@@ -20,17 +20,12 @@
  *
  * @min_alloc_order: log base 2 of number of bytes each bitmap bit represents
  * @nid: node id of the node the pool structure should be allocated on
- *	 (if set to GENALLOC_NID_NONE, allocation will occur wherever)
  */
 struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
 {
 	struct gen_pool *pool;
 
-	if (nid == GENALLOC_NID_NONE)
-		pool = kmalloc(sizeof(struct gen_pool), GFP_KERNEL);
-	else
-		pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid);
-
+	pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid);
 	if (pool != NULL) {
 		rwlock_init(&pool->lock);
 		INIT_LIST_HEAD(&pool->chunks);
@@ -48,35 +43,29 @@ EXPORT_SYMBOL(gen_pool_create);
  * @addr: starting address of memory chunk to add to pool
  * @size: size in bytes of the memory chunk to add to pool
  * @nid: node id of the node the chunk structure and bitmap should be
- *       allocated on (if set to GENALLOC_NID_NONE, allocation will occur
- *       wherever)
+ *       allocated on
  */
 int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
 		 int nid)
 {
 	struct gen_pool_chunk *chunk;
 	int nbits = size >> pool->min_alloc_order;
-	int nbytes = sizeof(struct gen_pool_chunk) + nbits / 8;
+	int nbytes = sizeof(struct gen_pool_chunk) +
+				(nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
 
 	if (nbytes > PAGE_SIZE) {
-		if (nid == GENALLOC_NID_NONE)
-			chunk = vmalloc(nbytes);
-		else
-			chunk = vmalloc_node(nbytes, nid);
+		chunk = vmalloc_node(nbytes, nid);
 	} else {
-		if (nid == GENALLOC_NID_NONE)
-			chunk = kmalloc(nbytes, GFP_KERNEL);
-		else
-			chunk = kmalloc_node(nbytes, GFP_KERNEL, nid);
+		chunk = kmalloc_node(nbytes, GFP_KERNEL, nid);
 	}
 
 	if (unlikely(chunk == NULL))
 		return -1;
 
+	memset(chunk, 0, nbytes);
 	spin_lock_init(&chunk->lock);
 	chunk->start_addr = addr;
 	chunk->end_addr = addr + size;
-	memset(&chunk->bits[0], 0, nbits / 8);
 
 	write_lock(&pool->lock);
 	list_add(&chunk->next_chunk, &pool->chunks);
_

Patches currently in -mm which might be from dcn@xxxxxxx are

change-gen_pool-allocator-to-not-touch-managed-memory.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux