From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20232 invoked by alias); 10 Oct 2011 14:04:48 -0000 Received: (qmail 20221 invoked by uid 22791); 10 Oct 2011 14:04:47 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (213.235.205.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 14:04:31 +0000 Received: by one.firstfloor.org (Postfix, from userid 503) id B08511A9808B; Mon, 10 Oct 2011 16:04:30 +0200 (CEST) Date: Mon, 10 Oct 2011 14:23:00 -0000 From: Andi Kleen To: Richard Guenther Cc: Andi Kleen , gcc-patches@gcc.gnu.org, Andi Kleen Subject: Re: [PATCH 1/5] Use MADV_DONTNEED for freeing in garbage collector Message-ID: <20111010140430.GY14482@one.firstfloor.org> References: <1318190141-1220-1-git-send-email-andi@firstfloor.org> <1318190141-1220-2-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00772.txt.bz2 > Shouldn't we prefer still "mapped" pages when allocating? Thus, keep > the freepages list "sorted"? Possibly. I can look at it in a followup if you want. I would prefer to not complicate this patch too much. > > With the new params to call release_pages less, how does this > interact with using MADV_DONTNEED? The only reason to delay > MADV_DONTNEED is to avoid splitting huge-pages? Which would > mean that we should rather be better at controlling where we allocate > from from the free-list? I first had a patch that tried to cluster inside the freelist with multiple passes (and only free aligned quire clusters first), but it ran into various problems, so I chose this simpler approach. With MADV_DONTNEED the param is not really needed I think, I mainly added the param for the benefit of hosts that don't have MADV_DONTNEED to let them not suffer from fragmentation too much. It would be possible to set the thresholds all to 0 if MADV_DONTNEED is available. -Andi