Thread (47 messages) 47 messages, 5 authors, 2012-10-30

Re: [PATCH v5 15/18] Aggregate memcg cache values in slabinfo

From: Christoph Lameter <hidden>
Date: 2012-10-19 19:50:40
Also in: linux-mm, lkml

On Fri, 19 Oct 2012, Glauber Costa wrote:
+
+/*
+ * We use suffixes to the name in memcg because we can't have caches
+ * created in the system with the same name. But when we print them
+ * locally, better refer to them with the base name
+ */
+static inline const char *cache_name(struct kmem_cache *s)
+{
+	if (!is_root_cache(s))
+		return s->memcg_params->root_cache->name;
+	return s->name;
+}
Could we avoid this uglyness? You can ID a slab cache by combining a memcg
pointer and a slabname.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help