From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754787AbbDHST1 (ORCPT ); Wed, 8 Apr 2015 14:19:27 -0400 Received: from mx2.parallels.com ([199.115.105.18]:51754 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685AbbDHSTW (ORCPT ); Wed, 8 Apr 2015 14:19:22 -0400 Date: Wed, 8 Apr 2015 21:19:11 +0300 From: Vladimir Davydov To: Christoph Lameter CC: Andrew Morton , Johannes Weiner , Michal Hocko , Pekka Enberg , David Rientjes , Joonsoo Kim , , , Subject: Re: [PATCH -mm] slab: use cgroup ino for naming per memcg caches Message-ID: <20150408181911.GA18199@esperanza> References: <1428414798-12932-1-git-send-email-vdavydov@parallels.com> <20150407133819.993be7a53a3aa16311aba1f5@linux-foundation.org> <20150408095404.GC10286@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2015 at 08:46:22AM -0500, Christoph Lameter wrote: > On Wed, 8 Apr 2015, Vladimir Davydov wrote: > > > has its own copy of kmem cache. What if we decide to share the same kmem > > cache among all memory cgroups one day? Of course, this will hardly ever > > happen, but it is an alternative approach to implementing the same > > /sys/kernel/slab already supports the use of symlinks. And both SLAB and > SLUB do slab merging which means effectively an aliasing of multiple slab > caches to the same name. Yeah, I think cache merging is a good argument for grouping memcg caches under /sys/kernel/slab//cgroup/. We cannot maintain symlinks for merged memcg caches, because when a memcg cache is created we do not have names of caches the new cache is merged with. If memcg caches were listed under /sys/kernel/slab/ along with global ones, absence of the symlinks would lead to confusion. Thanks, Vladimir