Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751325AbWIFI3z (ORCPT ); Wed, 6 Sep 2006 04:29:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932121AbWIFI3y (ORCPT ); Wed, 6 Sep 2006 04:29:54 -0400 Received: from mailhub.sw.ru ([195.214.233.200]:56944 "EHLO relay.sw.ru") by vger.kernel.org with ESMTP id S932662AbWIFI3d (ORCPT ); Wed, 6 Sep 2006 04:29:33 -0400 Message-ID: <44FE86EF.3050101@openvz.org> Date: Wed, 06 Sep 2006 12:29:35 +0400 From: Pavel Emelianov User-Agent: Thunderbird 1.5 (X11/20060317) MIME-Version: 1.0 To: balbir@in.ibm.com CC: Kirill Korotaev , Andrew Morton , Rik van Riel , CKRM-Tech , Linux Kernel Mailing List , Andi Kleen , Christoph Hellwig , Andrey Savochkin , Alan Cox , Hugh Dickins , Matt Helsley , Alexey Dobriyan , Oleg Nesterov , devel@openvz.org, Pavel Emelianov Subject: Re: [ckrm-tech] [PATCH 5/13] BC: user interface (syscalls) References: <44FD918A.7050501@sw.ru> <44FD9699.705@sw.ru> <44FDA024.7030700@in.ibm.com> In-Reply-To: <44FDA024.7030700@in.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1117 Lines: 28 Balbir Singh wrote: >> + >> +asmlinkage long sys_set_bcid(bcid_t id) >> +{ >> + int error; >> + struct beancounter *bc; >> + struct task_beancounter *task_bc; >> + >> + task_bc = ¤t->task_bc; > > I was playing around with the bc patches and found that to make > use of bc's, I had to actually call set_bcid() and then exec() a > task/shell so that the id would stick around. Would you consider That sounds very strange as sys_set_bcid() actually changes current's exec_bc. One note is about mm's bc - mm obtains new bc only after fork or exec - that's true. But kmemsize starts charging right after the sys_set_bcid. > changing sys_set_bcid to sys_set_task_bcid() or adding a new > system call sys_set_task_bcid()? We could pass the pid that we > intend to associate with the new id. This also means we'll need > locking around to protect task->task_bc. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/