public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
@ 2003-10-12 20:34 ` steven at gcc dot gnu dot org
2003-10-13 14:37 ` steven at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-10-12 20:34 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
------- Additional Comments From steven at gcc dot gnu dot org 2003-10-12 20:34 -------
Discussed this with Zack, and the patch "is essentially what [he] had in mind."
Zack suggested there are still a few things that need to be done, however:
1) two-level free page caching:
- after one collection, put all freepages on the per-order lists;
- after the next collection, put all thepages that are still on
the per-order lists on the global list;
- and after a third collection release the pages still on the global
list tothe OS.
This probably takes some fiddling with the page_entry struct. Also
we'll have to see how this works in relation with page groups
2) scavenge pages from other per-order lists rather than go back to the
OS for more.
(Personally I think this won't be necessary if (1) is implemented properly)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
2003-10-12 20:34 ` [Bug other/10944] alloc_page in ggc-page.c is slow steven at gcc dot gnu dot org
@ 2003-10-13 14:37 ` steven at gcc dot gnu dot org
2003-11-30 8:38 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-10-13 14:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-06-01 18:58:30 |2003-10-13 14:37:14
date| |
------- Additional Comments From steven at gcc dot gnu dot org 2003-10-13 14:37 -------
The new patch implements suggestion 1 from last nights list.
Andrew, you identified the loop over free_pages as a time consumer, but now that
it is gone, I get virtually no measurable time improvements (10ths of seconds on
>1min total compilation time) for the test case for PR8361. Which (not
surprisingly) once again shows that GC is slow because with each call
ggc_collect we need to do more and more marking...
Are you absolutely, positively sure that this loop is a performance hog?
Perhaps you can try the patch, it bootstrappes (c,objc,c++) and showed no
regressions on i686. So far I haven't found convincing evidence that it
improves performance significantly except for the most pathological (artificial)
cases.
Sigh, back to waiting for a new GC strategy...
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
2003-10-12 20:34 ` [Bug other/10944] alloc_page in ggc-page.c is slow steven at gcc dot gnu dot org
2003-10-13 14:37 ` steven at gcc dot gnu dot org
@ 2003-11-30 8:38 ` pinskia at gcc dot gnu dot org
2003-12-20 16:31 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-30 8:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-30 08:38 -------
I am going to push this (only because I have not have time to test the patch) and there is
already a new GC strategy (for 3.4) but does not work with everything.
--
What |Removed |Added
----------------------------------------------------------------------------
Priority|P1 |P2
Last reconfirmed|2003-10-13 14:37:14 |2003-11-30 08:38:20
date| |
Target Milestone|3.4 |3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
` (2 preceding siblings ...)
2003-11-30 8:38 ` pinskia at gcc dot gnu dot org
@ 2003-12-20 16:31 ` steven at gcc dot gnu dot org
2003-12-23 2:10 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-12-20 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2003-12-20 14:10 -------
I have experimented with my patch on three different targets (i686,x86_64, and
hpux) and have never seen any improvements with it even though it kills the
supposed hot spot in the code. I'm marking this as WAITING and I'll close it
soonish, unless someone can test this on the reporter's platform (ppc-darwin)
and show that it does help on that target.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
` (3 preceding siblings ...)
2003-12-20 16:31 ` steven at gcc dot gnu dot org
@ 2003-12-23 2:10 ` pinskia at gcc dot gnu dot org
2004-01-17 22:59 ` dhazeghi at yahoo dot com
2004-02-06 1:44 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-23 2:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-23 01:10 -------
Steven can you wait like three weeks before closing because I go on vaction tommorrow for about
two weeks and I cannot test the patch untill after I get back?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
` (4 preceding siblings ...)
2003-12-23 2:10 ` pinskia at gcc dot gnu dot org
@ 2004-01-17 22:59 ` dhazeghi at yahoo dot com
2004-02-06 1:44 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 14+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-17 22:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2004-01-17 22:59 -------
Andrew, did you get a chance to test the patch for this?
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
` (5 preceding siblings ...)
2004-01-17 22:59 ` dhazeghi at yahoo dot com
@ 2004-02-06 1:44 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-06 1:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-06 01:44 -------
I do not have time to test this, and it now this patch does not matter as Honza's work with the
compiler's memory and compile time stuff and Steven did not get any benifit from it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <20030522192332.10944.pinskia@physics.uc.edu>]
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 22:54 pinskia@physics.uc.edu
0 siblings, 0 replies; 14+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-23 22:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
------- Additional Comments From pinskia@physics.uc.edu 2003-05-23 22:40 -------
The backtraces are spread all over so that it is not just one place.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 22:54 pinskia@physics.uc.edu
0 siblings, 0 replies; 14+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-23 22:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
------- Additional Comments From pinskia@physics.uc.edu 2003-05-23 22:29 -------
Subject: Re: [Bug other/10944] alloc_page in ggc-page.c is slow
Yes it is spending 90% of the time in alloc_page in that list traversal.
I used Shikari (part of the CHUD tools) on Mac OS X for profiling the
complier
10000 samples ever 1ms (10s in total).
I can find out the backtrace if you want it.
Thanks,
Andrew Pinski
On Friday, May 23, 2003, at 17:52 US/Eastern, zack@gcc.gnu.org wrote:
>
> The code in alloc_page is remarkably stupid, but the linked list
> traversal
> should only occur when trying to allocate an object larger than a
> single
> page, which is believed to happen almost never. Can you please find
> out
> whether it's really spending time in that list, or if some other area
> is
> the cause of the problem?
>
> I'll take responsibility for this bug; I've been meaning to get us
> per-order
> freelists for a long time.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 22:51 zack@gcc.gnu.org
0 siblings, 0 replies; 14+ messages in thread
From: zack@gcc.gnu.org @ 2003-05-23 22:51 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
zack@gcc.gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned@gcc.gnu.org |zack@gcc.gnu.org
Status|ASSIGNED |NEW
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 22:08 zack@gcc.gnu.org
0 siblings, 0 replies; 14+ messages in thread
From: zack@gcc.gnu.org @ 2003-05-23 22:08 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
zack@gcc.gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2003-05-23 20:19:39 |2003-05-23 21:52:36
date| |
------- Additional Comments From zack@gcc.gnu.org 2003-05-23 21:52 -------
The code in alloc_page is remarkably stupid, but the linked list traversal
should only occur when trying to allocate an object larger than a single
page, which is believed to happen almost never. Can you please find out
whether it's really spending time in that list, or if some other area is
the cause of the problem?
I'll take responsibility for this bug; I've been meaning to get us per-order
freelists for a long time.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 20:29 pinskia@physics.uc.edu
0 siblings, 0 replies; 14+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-23 20:29 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-05-23 20:19:39
date| |
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug other/10944] alloc_page in ggc-page.c is slow
@ 2003-05-23 18:14 pinskia@physics.uc.edu
0 siblings, 0 replies; 14+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-23 18:14 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10944
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |8361
nThis| |
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-02-06 1:44 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030522192332.10944.pinskia@gcc.gnu.org>
2003-10-12 20:34 ` [Bug other/10944] alloc_page in ggc-page.c is slow steven at gcc dot gnu dot org
2003-10-13 14:37 ` steven at gcc dot gnu dot org
2003-11-30 8:38 ` pinskia at gcc dot gnu dot org
2003-12-20 16:31 ` steven at gcc dot gnu dot org
2003-12-23 2:10 ` pinskia at gcc dot gnu dot org
2004-01-17 22:59 ` dhazeghi at yahoo dot com
2004-02-06 1:44 ` pinskia at gcc dot gnu dot org
[not found] <20030522192332.10944.pinskia@physics.uc.edu>
2003-06-01 18:58 ` zack@gcc.gnu.org
2003-05-23 22:54 pinskia@physics.uc.edu
-- strict thread matches above, loose matches on Subject: below --
2003-05-23 22:54 pinskia@physics.uc.edu
2003-05-23 22:51 zack@gcc.gnu.org
2003-05-23 22:08 zack@gcc.gnu.org
2003-05-23 20:29 pinskia@physics.uc.edu
2003-05-23 18:14 pinskia@physics.uc.edu
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).