FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 05-19-2011, 04:55 PM
Mikulas Patocka
 
Default Reserve just one mempool entry

Reserve just one mempool entry

If our implementation is deadlock-free, we don't need large mempool
reserve. Just one entry is enough.

Note that in normal case, when if there is no memory pressure, we can
still allocate arbitrary number of entries from the slab cache.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
drivers/md/dm-kcopyd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6.39-rc7-fast/drivers/md/dm-kcopyd.c
================================================== =================
--- linux-2.6.39-rc7-fast.orig/drivers/md/dm-kcopyd.c 2011-05-18 18:15:35.000000000 +0200
+++ linux-2.6.39-rc7-fast/drivers/md/dm-kcopyd.c 2011-05-18 18:16:31.000000000 +0200
@@ -29,6 +29,7 @@

#define SUB_JOB_SIZE 128
#define SPLIT_COUNT 8
+#define MIN_JOBS 1

/*-----------------------------------------------------------------
* Each kcopyd client has its own little pool of preallocated
@@ -223,9 +224,6 @@ struct kcopyd_job {
struct kcopyd_job *master_job;
};

-/* FIXME: this should scale with the number of pages */
-#define MIN_JOBS 512
-
static struct kmem_cache *_job_cache;

int __init dm_kcopyd_init(void)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 05-19-2011, 04:55 PM
Mikulas Patocka
 
Default Reserve just one mempool entry

Reserve just one mempool entry

If our implementation is deadlock-free, we don't need large mempool
reserve. Just one entry is enough.

Note that in normal case, when if there is no memory pressure, we can
still allocate arbitrary number of entries from the slab cache.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
drivers/md/dm-kcopyd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6.39-rc7-fast/drivers/md/dm-kcopyd.c
================================================== =================
--- linux-2.6.39-rc7-fast.orig/drivers/md/dm-kcopyd.c 2011-05-18 18:15:35.000000000 +0200
+++ linux-2.6.39-rc7-fast/drivers/md/dm-kcopyd.c 2011-05-18 18:16:31.000000000 +0200
@@ -29,6 +29,7 @@

#define SUB_JOB_SIZE 128
#define SPLIT_COUNT 8
+#define MIN_JOBS 1

/*-----------------------------------------------------------------
* Each kcopyd client has its own little pool of preallocated
@@ -223,9 +224,6 @@ struct kcopyd_job {
struct kcopyd_job *master_job;
};

-/* FIXME: this should scale with the number of pages */
-#define MIN_JOBS 512
-
static struct kmem_cache *_job_cache;

int __init dm_kcopyd_init(void)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 10:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org