From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030496AbXCLQJl (ORCPT ); Mon, 12 Mar 2007 12:09:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030501AbXCLQJl (ORCPT ); Mon, 12 Mar 2007 12:09:41 -0400 Received: from mailhub.sw.ru ([195.214.233.200]:45491 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030496AbXCLQJk (ORCPT ); Mon, 12 Mar 2007 12:09:40 -0400 Message-ID: <45F57E7D.6080604@sw.ru> Date: Mon, 12 Mar 2007 19:23:25 +0300 From: Kirill Korotaev User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: en-us, en, ru MIME-Version: 1.0 To: "Eric W. Biederman" CC: Pavel Emelianov , containers@lists.osdl.org, Paul Menage , Linux Kernel Mailing List , Andrew Morton Subject: Re: [RFC][PATCH 4/7] RSS accounting hooks over the code References: <45ED7DEC.7010403@sw.ru> <45ED81F2.80402@sw.ru> In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Eric W. Biederman wrote: > Pavel Emelianov writes: > > >>Pages are charged to their first touchers which are >>determined using pages' mapcount manipulations in >>rmap calls. > > > NAK pages should be charged to every rss group whose mm_struct they > are mapped into. For these you essentially need per-container page->_mapcount counter, otherwise you can't detect whether rss group still has the page in question being mapped in its processes' address spaces or not. 1. This was discussed before and considered to be ok by all the resource management involved people. 2. this can be done with a-la page beancounters which are used in OVZ for shared fractions accounting. It's a next step forward. If you know how to get "pages should be charged to every rss group whose mm_struct they are mapped into" w/o additional pointer in struct page, please throw me an idea. Thanks, Kirill