From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075Ab3LCJoo (ORCPT ); Tue, 3 Dec 2013 04:44:44 -0500 Received: from relay.parallels.com ([195.214.232.42]:52026 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752942Ab3LCJok (ORCPT ); Tue, 3 Dec 2013 04:44:40 -0500 Message-ID: <529DA806.5010307@parallels.com> Date: Tue, 3 Dec 2013 13:44:38 +0400 From: Vladimir Davydov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130922 Icedove/17.0.9 MIME-Version: 1.0 To: Dave Chinner CC: , , , , , , , , , Mel Gorman , Rik van Riel Subject: Re: [PATCH v12 06/18] vmscan: rename shrink_slab() args to make it more generic References: <6fbe648a707331e0716cc7a4fc6366ca83a97f6a.1385974612.git.vdavydov@parallels.com> <20131203093323.GC8803@dastard> In-Reply-To: <20131203093323.GC8803@dastard> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.30.16.96] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/2013 01:33 PM, Dave Chinner wrote: >> kmemcg reclaim is introduced, we will have to make up phony values for >> nr_pages_scanned and lru_pages again when doing kmem-only reclaim for a >> memory cgroup, which is possible if the cgroup has its kmem limit less >> than the total memory limit. > I'm missing something here - why would memcg reclaim require > passing phony values? How are you going to keep slab caches in > balance with memory pressure generated by the page cache? To perform kmem-only reclaim - please see patch 13. When the kmem limit is less than the user limit, we can reach only the kmem limit. It is no use trying to reclaim page cache then. On normal reclaim - I mean try_to_free_mem_cgroup_pages() - I pass nr_scanned/lru_pages to shrink_slab() as usual. Thanks.