Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750704AbWHYKGT (ORCPT ); Fri, 25 Aug 2006 06:06:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751423AbWHYKGT (ORCPT ); Fri, 25 Aug 2006 06:06:19 -0400 Received: from mailhub.sw.ru ([195.214.233.200]:9342 "EHLO relay.sw.ru") by vger.kernel.org with ESMTP id S1750704AbWHYKGS (ORCPT ); Fri, 25 Aug 2006 06:06:18 -0400 Message-ID: <44EECC47.7080902@sw.ru> Date: Fri, 25 Aug 2006 14:09:11 +0400 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: Oleg Nesterov CC: Andrew Morton , Linux Kernel Mailing List , Alan Cox , Christoph Hellwig , Pavel Emelianov , Andrey Savochkin , devel@openvz.org, Rik van Riel , Andi Kleen , Greg KH , Matt Helsley , Rohit Seth , Chandra Seetharaman Subject: Re: [PATCH 5/6] BC: kernel memory accounting (core) References: <44EC31FB.2050002@sw.ru> <44EC36D3.9030108@sw.ru> <20060824212340.GA952@oleg> In-Reply-To: <20060824212340.GA952@oleg> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 27 Oleg Nesterov wrote: > On 08/23, Kirill Korotaev wrote: > >>+int bc_slab_charge(kmem_cache_t *cachep, void *objp, gfp_t flags) >>+{ >>+ unsigned int size; >>+ struct beancounter *bc, **slab_bcp; >>+ >>+ bc = get_exec_bc(); >>+ if (bc == NULL) >>+ return 0; > > > Is it possible to .exec_bc == NULL ? > > If yes, why do we need init_bc? We can do 'set_exec_bc(NULL)' in __do_IRQ() > instead. no, exec_bc can't be NULL. thanks for catching old hunks which historically exist due to old times when host system was not accounted (bc was NULL). Thanks, Kirill - 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/