[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#7489: [coreutils] over aggressive threads in sort
From: |
Paul Eggert |
Subject: |
Re: bug#7489: [coreutils] over aggressive threads in sort |
Date: |
Fri, 03 Dec 2010 13:10:58 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 |
On 12/03/10 12:18, Chen Guo wrote:
> I'll try out Professor Eggert's suggestion, of switching to mutexes
> only at the top level merge.
I'm having second thoughts about that. Yes, that'll prevent the
top-level merge (which is generating the actual output) from chewing
up CPU time. But it already has that property, since it's outputting
to stdout. And if second-level merges use mutexes, then the third-level
merges will spin. We'll have to use mutexes at all levels, unless
I'm missing something.
How about this idea instead. Keep using spin locks everywhere, but
have the top-level merge output to memory, as the lower merges already
do. The main thread can wait for the top level merge to finish and
then generate output. That way, none of the merges will have to wait
on an output pipe (or a slow output file).
Either option (either switch to mutexes everywhere, or have the top-level
merge go to memory) should work. Perhaps we should try both and benchmark
them.
- Re: bug#7489: [coreutils] over aggressive threads in sort, (continued)
Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/01
Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/02
- Re: bug#7489: [coreutils] over aggressive threads in sort, Paul Eggert, 2010/12/02
- Re: bug#7489: [coreutils] over aggressive threads in sort, Jim Meyering, 2010/12/02
- Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/03
- Re: bug#7489: [coreutils] over aggressive threads in sort,
Paul Eggert <=
- Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/06
- Re: bug#7489: [coreutils] over aggressive threads in sort, Paul Eggert, 2010/12/06
- Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/06
- Re: bug#7489: [coreutils] over aggressive threads in sort, Jim Meyering, 2010/12/07
- Re: bug#7489: [coreutils] over aggressive threads in sort, Jim Meyering, 2010/12/07
- Re: bug#7489: [coreutils] over aggressive threads in sort, Chen Guo, 2010/12/07
- [coreutils] multi-threaded sort can segfault (unrelated to the sort -u segfault), Jim Meyering, 2010/12/09
- Re: [coreutils] multi-threaded sort can segfault (unrelated to the sort -u segfault), Jim Meyering, 2010/12/09
- [coreutils] Re: multi-threaded sort can segfault (unrelated to the sort -u segfault), Paul Eggert, 2010/12/09
- [coreutils] Re: bug#7597: multi-threaded sort can segfault (unrelated to the sort -u segfault), Chen Guo, 2010/12/10