summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-12-10 20:52:04 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-12-11 00:29:13 -0800
commitd1f700355630c2d6e22ebff9de5f15b10aa14185 (patch)
treec24c292ad59289ee47e61c8883d2a1f928b8bb89
parent621876ff446885d32922f34681790581c994f9a5 (diff)
downloadcoreutils-d1f700355630c2d6e22ebff9de5f15b10aa14185.tar.xz
sort: comment fix
* src/sort.c: Comment fix re spin locks.
-rw-r--r--src/sort.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sort.c b/src/sort.c
index 9cfc8144f..36e3b19fb 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -3149,10 +3149,7 @@ compare_nodes (void const *a, void const *b)
return nodea->level < nodeb->level;
}
-/* Lock a merge tree NODE.
- Spin locks were seen to perform better than mutexes when the number
- of threads is limited to the number of processors, assuming 'sort'
- never waits when writing to stdout. */
+/* Lock a merge tree NODE. */
static inline void
lock_node (struct merge_node *node)
@@ -4567,8 +4564,6 @@ main (int argc, char **argv)
}
else
{
- /* If NTHREADS > number of cores on the machine, spinlocking
- could be wasteful. */
unsigned long int np2 = num_processors (NPROC_CURRENT_OVERRIDABLE);
if (!nthreads || nthreads > np2)
nthreads = np2;