Skip to contentSkip to conversation

mark shrinkable slabs as being reclaimable

PATCH David Woodhouse 2 participants 2 messages May 27, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Linux Kernel Mailing List

ChangeSet 1.1308, 2003/05/25 15:11:47-07:00, [email protected]

[PATCH] mark shrinkable slabs as being reclaimable

All slabs which can be reclaimed via VM presure are marked as being shrinkable, so the core slab code will keep count of their pages.

If my understanding of this is correct -- stuff that will be freed on prune_icache() or other memory pressure should be marked such -- then...

fs/jffs/inode-v23.c line 1810

Quoted 10 lines

diff -Nru a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c

fs/jffs/inode-v23.c +2 -1
@@ -1806,9 +1806,11 @@
 	jffs_proc_root = proc_mkdir("jffs", proc_root_fs);
 #endif
 	fm_cache = kmem_cache_create("jffs_fm", sizeof(struct jffs_fm),
-				     0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+				     0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, 
+				     NULL, NULL);

No.

fs/jffs/inode-v23.c line 1813

Quoted 4 lines
fs/jffs/inode-v23.c +2 -1
 	node_cache = kmem_cache_create("jffs_node",sizeof(struct jffs_node),
-				       0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+				       0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, 
+				       NULL, NULL);

No.

fs/jffs2/malloc.c line 77

Quoted 10 lines

diff -Nru a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c

fs/jffs2/malloc.c +2 -1
@@ -73,7 +73,8 @@
 
 	inode_cache_slab = kmem_cache_create("jffs2_inode_cache",
 					     sizeof(struct jffs2_inode_cache),
-					     0, JFFS2_SLAB_POISON, NULL, NULL);
+					     0, JFFS2_SLAB_POISON|SLAB_RECLAIM_ACCOUNT, 
+					     NULL, NULL);

No.

fs/jffs2/super.c line 303

Quoted 9 lines
fs/jffs2/super.c +1 -1
@@ -299,7 +299,7 @@
 
 	jffs2_inode_cachep = kmem_cache_create("jffs2_i",
 					     sizeof(struct jffs2_inode_info),
-					     0, SLAB_HWCACHE_ALIGN,
+					     0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
 					     jffs2_i_init_once, NULL);

Yes.

Signature · 1 line
dwmw2
#2 lore raw
Quoted 11 lines · David Woodhouse
Quoted 6 lines · Linux Kernel Mailing List

ChangeSet 1.1308, 2003/05/25 15:11:47-07:00, [email protected]

[PATCH] mark shrinkable slabs as being reclaimable

All slabs which can be reclaimed via VM presure are marked as being shrinkable, so the core slab code will keep count of their pages.

If my understanding of this is correct -- stuff that will be freed on prune_icache() or other memory pressure should be marked such -- then...

That is correct.

Quoted 3 lines

No.
No.
No.

OK ;) Could you please fix that up in your next code drop?