From: Jakub Jelinek <jakub@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: gcc-patches@gcc.gnu.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 3/3] Add a fragmentation fallback in ggc-page
Date: Fri, 21 Oct 2011 09:06:00 -0000 [thread overview]
Message-ID: <20111021060057.GP2210@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <1319176370-26071-4-git-send-email-andi@firstfloor.org>
On Fri, Oct 21, 2011 at 07:52:50AM +0200, Andi Kleen wrote:
> @@ -776,13 +778,18 @@ alloc_page (unsigned order)
> extras on the freelist. (Can only do this optimization with
> mmap for backing store.) */
> struct page_entry *e, *f = G.free_pages;
> - int i;
> + int i, entries;
>
> - page = alloc_anon (NULL, G.pagesize * GGC_QUIRE_SIZE);
> + page = alloc_anon (NULL, G.pagesize * GGC_QUIRE_SIZE, false);
> + if (page == NULL)
> + {
> + page = alloc_anon(NULL, G.pagesize, true);
> + entries = 1;
> + }
>
> /* This loop counts down so that the chain will be in ascending
> memory order. */
> - for (i = GGC_QUIRE_SIZE - 1; i >= 1; i--)
> + for (i = entries - 1; i >= 1; i--)
entries may be uninitialized here. Plus indentantion is wrong
(missing space between alloc_anon and (, incorrect amount or kind
(tab vs. spaces) of leading whitespace.
Jakub
prev parent reply other threads:[~2011-10-21 6:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 7:29 Updated ggc anti fragmentation patchkit Andi Kleen
2011-10-21 8:00 ` [PATCH 2/3] Free large chunks in ggc Andi Kleen
2011-10-21 10:39 ` Richard Guenther
2011-10-21 18:48 ` Andi Kleen
2011-10-23 13:42 ` Richard Guenther
2011-10-23 14:33 ` Richard Guenther
2011-10-23 20:03 ` Andi Kleen
2011-10-21 8:16 ` [PATCH 1/3] Add missing page rounding of a page_entry Andi Kleen
2011-10-21 10:04 ` Richard Guenther
2011-10-21 10:29 ` Jakub Jelinek
2011-10-21 18:08 ` Andi Kleen
2011-10-21 8:33 ` [PATCH 3/3] Add a fragmentation fallback in ggc-page Andi Kleen
2011-10-21 9:06 ` Jakub Jelinek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111021060057.GP2210@tyan-ft48-01.lab.bos.redhat.com \
--to=jakub@redhat.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).