Re: No, really, stop trying to delete slab until you've finished making slub perform as well

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

 



KOSAKI Motohiro wrote:


> <SLUB>
> 
> % cat /proc/meminfo
>
> Slab:            1591680 kB
> SReclaimable:      12608 kB
> SUnreclaim:      1579072 kB

Unreclaimable grew very big.


> :t-0000128               28739     128     1.3G  20984/20984/8  512 0  99   0 *

Argh. Most slabs contain a single object. Probably due to the conflict resolution.


> kmalloc-192               4609     192    85.9M    1303/1303/8  341 0  99   1

And a similar but not so severe issue here.

The obvious fix is to avoid allocating another slab on conflict but how will
this impact performance?


Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c	2008-08-13 08:06:00.000000000 -0500
+++ linux-2.6/mm/slub.c	2008-08-13 08:07:59.000000000 -0500
@@ -1253,13 +1253,11 @@
 static inline int lock_and_freeze_slab(struct kmem_cache_node *n,
 							struct page *page)
 {
-	if (slab_trylock(page)) {
-		list_del(&page->lru);
-		n->nr_partial--;
-		__SetPageSlubFrozen(page);
-		return 1;
-	}
-	return 0;
+	slab_lock(page);
+	list_del(&page->lru);
+	n->nr_partial--;
+	__SetPageSlubFrozen(page);
+	return 1;
 }

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux