From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [PATCH v3 3/4] limit nr_dentries per superblock Date: Mon, 15 Aug 2011 15:23:22 +0300 Message-ID: References: <1313334832-1150-1-git-send-email-glommer@parallels.com> <1313334832-1150-4-git-send-email-glommer@parallels.com> <20110815104656.GG26978@dastard> <4E48FD8A.90401@parallels.com> <4E4903C1.9050207@parallels.com> <4E490D47.8050105@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Dave Chinner , Glauber Costa , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "containers@lists.linux-foundation.org" , Al Viro , Hugh Dickins , Nick Piggin , Andrea Arcangeli , Rik van Riel , Dave Hansen , James Bottomley , Eric Dumazet , Christoph Lameter , David Rientjes To: Pavel Emelyanov Return-path: In-Reply-To: <4E490D47.8050105@parallels.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Aug 15, 2011 at 3:12 PM, Pavel Emelyanov = wrote: > On 08/15/2011 03:55 PM, Pekka Enberg wrote: >> On Mon, Aug 15, 2011 at 2:32 PM, Pavel Emelyanov wrote: >>>> Couldn't you simply do per-container "struct kmem_accounted_cache"= in struct superblock? >>> >>> If by this you mean "account for all the kmem associated with parti= cular superblock" then >>> this is OK for us, but this can't be done in a simple >>> >>> =A0 =A0 =A0 =A0if (used + size > limit) >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -ENOMEM >>> =A0 =A0 =A0 =A0else { >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0used +=3D size; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0; >>> =A0 =A0 =A0 =A0} >>> >>> manner, since once we hit the limit we should shrink the unused den= tries. And most of the >>> patches are about this. >> >> So you want to shrink dentries that were allocated in the container >> that hit the dcache limit? How does this patch set deal with that? O= r >> are you referring to some other patches? > > Yes, this patchset does only the API part. The full idea is implement= ed (with poor API though) here: > http://lwn.net/Articles/441164/ OK. I suppose it's best to keep it separate of the slab code for now then. Maybe you're able to come with something more generic that we could make part of slab APIs later. Pekka