From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261297AbULWUIF (ORCPT ); Thu, 23 Dec 2004 15:08:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261300AbULWUIF (ORCPT ); Thu, 23 Dec 2004 15:08:05 -0500 Received: from quark.didntduck.org ([69.55.226.66]:25778 "EHLO quark.didntduck.org") by vger.kernel.org with ESMTP id S261304AbULWUH4 (ORCPT ); Thu, 23 Dec 2004 15:07:56 -0500 Message-ID: <41CB25AE.6010109@didntduck.org> Date: Thu, 23 Dec 2004 15:08:14 -0500 From: Brian Gerst User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Lameter CC: akpm@osdl.org, linux-ia64@vger.kernel.org, torvalds@osdl.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: Prezeroing V2 [1/4]: __GFP_ZERO / clear_page() removal References: <41C20E3E.3070209@yahoo.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Christoph Lameter wrote: > This patch introduces __GFP_ZERO as an additional gfp_mask element to allow > to request zeroed pages from the page allocator. > > o Modifies the page allocator so that it zeroes memory if __GFP_ZERO is set > > o Replace all page zeroing after allocating pages by request for > zeroed pages. > > o requires arch updates to clear_page in order to function properly. > > Signed-off-by: Christoph Lameter > > @@ -125,22 +125,19 @@ > int i; > struct packet_data *pkt; > > - pkt = kmalloc(sizeof(struct packet_data), GFP_KERNEL); > + pkt = kmalloc(sizeof(struct packet_data), GFP_KERNEL|__GFP_ZERO); > if (!pkt) > goto no_pkt; > - memset(pkt, 0, sizeof(struct packet_data)); > > pkt->w_bio = pkt_bio_alloc(PACKET_MAX_SIZE); > if (!pkt->w_bio) This part is wrong. kmalloc() uses the slab allocator instead of getting a full page. -- Brian Gerst