From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2565 invoked by alias); 10 Oct 2011 14:53:58 -0000 Received: (qmail 2556 invoked by uid 22791); 10 Oct 2011 14:53:56 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 14:53:42 +0000 Received: by yxj17 with SMTP id 17so6413025yxj.20 for ; Mon, 10 Oct 2011 07:53:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.188.9 with SMTP id l9mr6843705ybf.15.1318258421383; Mon, 10 Oct 2011 07:53:41 -0700 (PDT) Received: by 10.151.9.9 with HTTP; Mon, 10 Oct 2011 07:53:41 -0700 (PDT) In-Reply-To: <20111010135825.GX14482@one.firstfloor.org> References: <1318190141-1220-1-git-send-email-andi@firstfloor.org> <1318190141-1220-5-git-send-email-andi@firstfloor.org> <20111010135825.GX14482@one.firstfloor.org> Date: Mon, 10 Oct 2011 14:59:00 -0000 Message-ID: Subject: Re: [PATCH 4/5] Add a freeing threshold for the garbage collector. From: Richard Guenther To: Andi Kleen Cc: gcc-patches@gcc.gnu.org, Andi Kleen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00775.txt.bz2 On Mon, Oct 10, 2011 at 3:58 PM, Andi Kleen wrote: > On Mon, Oct 10, 2011 at 12:20:53PM +0200, Richard Guenther wrote: >> On Sun, Oct 9, 2011 at 9:55 PM, Andi Kleen wrote: >> > From: Andi Kleen >> > >> > Add a threshold to avoid freeing pages back too early to the OS. >> > This avoid virtual memory map fragmentation. >> > >> > Based on a idea from Honza >> >> Less than 20% looks high. =A0Shouldn't ggc-free-min be enough to >> avoid fragmentation? > > It depends on the working set. If there's more to garbage collect > than max(ggc-free-min, threshold*total) a host without MADV_DONTNEED > will get holes. And ggc-free-min isn't very much on a large > build. > > So it seems safer to me to have a threshold which adjusts for large > working sets. What value do you prefer instead of 20%? (or just 0) I'm not sure honestly - 10% maybe? I realize it's quite arbitrary ... >> >> This will hide gc bugs with always-collect (ggc-checking), so >> the parameter(s) need to be adjusted for that case to always >> give pages back. =A0The current values should probably be printed >> where the two existing ones are printed as well (with -v). > > Will fix. > -Andi >