Remove BKL removal patches, since they don't seem to be portable on
[ext4-patch-queue.git] / jbd2_group_short_lived_and_reclaimable_kernel_allocations.patch
blobaafd5fa2b44614dbbd03929044d4d6592125ed68
1 jbd2: Mark jbd2 slabs as SLAB_TEMPORARY
3 From: Mingming Cao <cmm@us.ibm.com>
5 This patch marks slab allocations by jbd2 as short-lived in support of
6 Mel Gorman's "Group short-lived and reclaimable kernel allocations"
7 patch. (Ported from similar changes made to fs/jbd/journal.c and
8 fs/jbd/revoke.c in Mel's patch.)
10 Cc: Mel Gorman <mel@csn.ul.ie>
11 Cc: Andrew Morton <akpm@linux-foundation.org>
12 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
13 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 ---
17 ---
18 fs/jbd2/journal.c | 4 ++--
19 fs/jbd2/revoke.c | 6 ++++--
20 2 files changed, 6 insertions(+), 4 deletions(-)
22 Index: linux-2.6.24-rc8/fs/jbd2/journal.c
23 ===================================================================
24 --- linux-2.6.24-rc8.orig/fs/jbd2/journal.c 2008-01-25 08:47:19.000000000 -0800
25 +++ linux-2.6.24-rc8/fs/jbd2/journal.c 2008-01-25 09:10:13.000000000 -0800
26 @@ -1973,7 +1973,7 @@ static int journal_init_jbd2_journal_hea
27 jbd2_journal_head_cache = kmem_cache_create("jbd2_journal_head",
28 sizeof(struct journal_head),
29 0, /* offset */
30 - 0, /* flags */
31 + SLAB_TEMPORARY, /* flags */
32 NULL); /* ctor */
33 retval = 0;
34 if (jbd2_journal_head_cache == 0) {
35 @@ -2269,7 +2269,7 @@ static int __init journal_init_handle_ca
36 jbd2_handle_cache = kmem_cache_create("jbd2_journal_handle",
37 sizeof(handle_t),
38 0, /* offset */
39 - 0, /* flags */
40 + SLAB_TEMPORARY, /* flags */
41 NULL); /* ctor */
42 if (jbd2_handle_cache == NULL) {
43 printk(KERN_EMERG "JBD: failed to create handle cache\n");
44 Index: linux-2.6.24-rc8/fs/jbd2/revoke.c
45 ===================================================================
46 --- linux-2.6.24-rc8.orig/fs/jbd2/revoke.c 2008-01-25 08:47:19.000000000 -0800
47 +++ linux-2.6.24-rc8/fs/jbd2/revoke.c 2008-01-25 09:10:13.000000000 -0800
48 @@ -171,13 +171,15 @@ int __init jbd2_journal_init_revoke_cach
50 jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
51 sizeof(struct jbd2_revoke_record_s),
52 - 0, SLAB_HWCACHE_ALIGN, NULL);
53 + 0,
54 + SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY,
55 + NULL);
56 if (jbd2_revoke_record_cache == 0)
57 return -ENOMEM;
59 jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
60 sizeof(struct jbd2_revoke_table_s),
61 - 0, 0, NULL);
62 + 0, SLAB_TEMPORARY, NULL);
63 if (jbd2_revoke_table_cache == 0) {
64 kmem_cache_destroy(jbd2_revoke_record_cache);
65 jbd2_revoke_record_cache = NULL;