Просмотр исходного кода

Fix poor parallel throughput on larger SMP systems.

When select() returns with data on one or more file descriptors, 
we use fread() to read data from the live descriptors.  The problem 
is that these are blocking file descriptors so most of the time 
bjam is waiting, it's actually waiting in fread(), rather than 
waiting in select().

There are two possible patches: one is to just call fread() a single  
time (not inside a loop) or we can make the file descriptors non- 
blocking.  It's more efficient to make the descriptors non-blocking  
as this allows us to read all data on a descriptor each time select()  
returns.  The first approach would not permit us to read all the data  
on a descriptor (only as much as fits into our buffer).

I tested this patch on Suse, Redhat, and Darwin.



[SVN r66650]
K. Noel Belcourt 15 лет назад
Родитель
Сommit
789bb20eff
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tools/build

+ 1 - 1
tools/build

@@ -1 +1 @@
-Subproject commit 0766ec37f913310fc50f08dc021fb983fb093333
+Subproject commit 5022f01a926ba8b5367c157528bc9ee89f56c88e

粤ICP备19079148号