From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753459AbYCYHth (ORCPT ); Tue, 25 Mar 2008 03:49:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751324AbYCYHt3 (ORCPT ); Tue, 25 Mar 2008 03:49:29 -0400 Received: from one.firstfloor.org ([213.235.205.2]:34565 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751084AbYCYHt3 (ORCPT ); Tue, 25 Mar 2008 03:49:29 -0400 Date: Tue, 25 Mar 2008 08:52:36 +0100 From: Andi Kleen To: Christoph Lameter Cc: Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [13/14] vcompound: Use vcompound for swap_map Message-ID: <20080325075236.GG2170@one.firstfloor.org> References: <20080321061703.921169367@sgi.com> <20080321061727.269764652@sgi.com> <8763vfixb8.fsf@basil.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 24, 2008 at 12:54:54PM -0700, Christoph Lameter wrote: > On Fri, 21 Mar 2008, Andi Kleen wrote: > > > But I used a simple trick to avoid the waste problem: it allocated a > > continuous range rounded up to the next page-size order and then freed > > the excess pages back into the page allocator. That was called > > alloc_exact(). If you replace vmalloc with alloc_pages you should > > use something like that too I think. > > One way of dealing with it would be to define an additional allocation > variant that allows the limiting of the loss? I noted that both the swap > and the wait tables vary significantly between allocations. So we could > specify an upper boundary of a loss that is acceptable. If too much memory > would be lost then use vmalloc unconditionally. I liked your idea of fixing compound pages to not rely on order better. Ok it is likely more work to implement @) Also if anything preserving memory should be default, but maybe skippable a with __GFP_GO_FAST flag. -Andi