From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yh0-f54.google.com (mail-yh0-f54.google.com [209.85.213.54]) by kanga.kvack.org (Postfix) with ESMTP id CC5F56B0031 for ; Tue, 15 Apr 2014 15:32:21 -0400 (EDT) Received: by mail-yh0-f54.google.com with SMTP id f73so9853316yha.13 for ; Tue, 15 Apr 2014 12:32:21 -0700 (PDT) Received: from qmta13.emeryville.ca.mail.comcast.net (qmta13.emeryville.ca.mail.comcast.net. [2001:558:fe2d:44:76:96:27:243]) by mx.google.com with ESMTP id k49si20128159yhg.175.2014.04.15.12.32.20 for ; Tue, 15 Apr 2014 12:32:21 -0700 (PDT) Date: Tue, 15 Apr 2014 14:32:17 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH -mm 1/4] memcg, slab: do not schedule cache destruction when last page goes away In-Reply-To: <534D83AB.6040107@parallels.com> Message-ID: References: <8ea8b57d5264f16ee33497a4317240648645704a.1397054470.git.vdavydov@parallels.com> <20140415021614.GC7969@cmpxchg.org> <534CD08F.30702@parallels.com> <534D83AB.6040107@parallels.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Vladimir Davydov Cc: Johannes Weiner , akpm@linux-foundation.org, mhocko@suse.cz, glommer@gmail.com, penberg@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, devel@openvz.org On Tue, 15 Apr 2014, Vladimir Davydov wrote: > > There is already logic in both slub and slab that does that on cache > > close. > > Yeah, but here the question is when we should close caches left after memcg > offline. Obviously we should do it after all objects of such a cache have > gone, but when exactly? Do it immediately after the last kfree (have to count > objects per cache then AFAIU) or may be check periodically (or on vmpressure) > that the cache is empty by issuing kmem_cache_shrink and looking if > memcg_params::nr_pages = 0? Guess check once in a while if you have no other way to determine this. A hook in kfree() would impact all users. -- 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: email@kvack.org