public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	Andi Kleen <andi@firstfloor.org>,
	gcc-patches@gcc.gnu.org,	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/3] Add missing page rounding of a page_entry
Date: Fri, 21 Oct 2011 18:08:00 -0000	[thread overview]
Message-ID: <20111021170553.GB22535@one.firstfloor.org> (raw)
In-Reply-To: <20111021095244.GR2210@tyan-ft48-01.lab.bos.redhat.com>

On Fri, Oct 21, 2011 at 11:52:44AM +0200, Jakub Jelinek wrote:
> On Fri, Oct 21, 2011 at 11:42:26AM +0200, Richard Guenther wrote:
> > On Fri, Oct 21, 2011 at 7:52 AM, Andi Kleen <andi@firstfloor.org> wrote:
> > > From: Andi Kleen <ak@linux.intel.com>
> > >
> > > This one place in ggc forgot to round page_entry->bytes to the
> > > next page boundary, which lead to all the heuristics in freeing to
> > > check for continuous memory failing. Round here too, like all other
> > > allocators already do. The memory consumed should be the same
> > > for MMAP because the kernel would round anyways. It may slightly
> > > increase memory usage when malloc groups are used.
> > >
> > > This will also increase the hitrate on the free page list
> > > slightly.
> > 
> > > 2011-10-18  Andi Kleen  <ak@linux.intel.com>
> > >
> > >        * ggc-page.c (alloc_pages): Always round up entry_size.
> 
> As I said in the PR, ROUND_UP should make the previous
>   if (entry_size < G.pagesize)
>     entry_size = G.pagesize;
> completely unnecessary.  

AFAIK there are objects > pagesize in GGC, but not too many

But you're right it will be somewhat expensive (although the mmap
is not very common anyways and most other allocations
already do the roundup). I can drop it.

-Andi

  reply	other threads:[~2011-10-21 17:06 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 [this message]
2011-10-21  8:33 ` [PATCH 3/3] Add a fragmentation fallback in ggc-page Andi Kleen
2011-10-21  9:06   ` Jakub Jelinek

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=20111021170553.GB22535@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=richard.guenther@gmail.com \
    /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).