From: Michael Elizabeth Chastain <mec@shout.net>
To: bje@redhat.com, gdb-patches@sources.redhat.com
Cc: binutils@sources.redhat.com, gcc-patches@gcc.gnu.org
Subject: Re: (toplevel) Fix dramatic breakage for ordinary crosses (related to program_transform_name)
Date: Mon, 06 Jan 2003 00:49:00 -0000 [thread overview]
Message-ID: <200301060049.h060nOh25125@duracef.shout.net> (raw)
Ben Elliston writes:
> If, instead, the cache were a "dot" directory that contained files
> whose filenames had the form "key=value", then test results could be
> examined or updated using atomic file system operations and there
> should be no races.
The Linux kernel does something similar for its configuration variables
(which are different than autoconf cache entries): one file per variable.
The kernel does this to achieve fine-grained dependencies on the
configuration, so that changing CONFIG_DRIVER_FOO causes recompilation
of only the files that depend on CONFIG_DRIVER_FOO.
With a little care I think this would be thread safe. One tricky point
is that you have to be prepared for a file to not exist at the moment
you open it because some other thread is doing an "unlink / rename" at
that moment. Since this is a cache, that will simply cause some extra
cache misses.
There is a potential for a thundering-herd performance problem where every
thread wants to compute HAVE_FOO_H, they all deposit identical copies into
the cache, and then they move on and see that HAVE_BAR_H is not in the
cache either, lockstepping their way through similar configure scripts.
It would actually improve efficiency for autoconf to randomize the order
of tests in the configure script. :)
Also, I think that you could mix the two cache styles in a single tree.
All the old-style subdirectories would use config.cache, and all
the new-style subdirectories would use the new fine-grained cache.
Serialization would be needed only for old-style "config.cache"
subdirectories. New-style subdirectories could somehow say to autogen
"I am new-style, I use the new fine-grained cache, don't serialize my
configure goal with other configure goals." There would be a performance
penalty for a mixed tree, which would go away when the last old-style
subdirectory got upgraded.
Michael C
back-seat driver :)
next reply other threads:[~2003-01-06 0:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-06 0:49 Michael Elizabeth Chastain [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-29 0:39 Michael Elizabeth Chastain
2002-12-29 2:48 ` Alexandre Oliva
2002-12-28 13:22 Michael Elizabeth Chastain
2002-12-28 13:44 ` Alexandre Oliva
2003-01-06 0:04 ` Ben Elliston
2002-12-28 4:36 Nathanael Nerode
2002-12-28 8:33 ` Alexandre Oliva
2002-12-28 9:51 ` Daniel Jacobowitz
2002-12-28 9:56 ` Alexandre Oliva
2002-12-28 9:59 ` Daniel Jacobowitz
2002-12-28 10:41 ` Alexandre Oliva
2002-12-28 10:46 ` Dan Kegel
2002-12-28 11:07 ` DJ Delorie
2002-12-28 12:26 ` Daniel Jacobowitz
2002-12-28 10:50 ` Daniel Jacobowitz
2002-12-28 11:01 ` DJ Delorie
2002-12-28 12:57 ` Alexandre Oliva
2002-12-28 13:51 ` Alexandre Oliva
2002-12-29 18:57 ` Alexandre Oliva
2002-12-28 14:14 ` DJ Delorie
2002-12-28 15:22 ` Alexandre Oliva
2002-12-28 10:54 ` Alexandre Oliva
2002-12-28 10:49 ` DJ Delorie
2002-12-28 11:00 ` DJ Delorie
2002-12-28 1:00 Nathanael Nerode
2002-12-28 1:22 ` Alexandre Oliva
2002-12-28 1:33 ` Alexandre Oliva
2002-12-28 7:47 ` Kazu Hirata
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=200301060049.h060nOh25125@duracef.shout.net \
--to=mec@shout.net \
--cc=binutils@sources.redhat.com \
--cc=bje@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sources.redhat.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