Skip to content

Commit 74c73f4

Browse files
committed
Remove sched_yield() logic
1 parent 525802e commit 74c73f4

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

source/adios2/toolkit/sst/dp/rdma_dp.c

-12
Original file line numberDiff line numberDiff line change
@@ -1703,20 +1703,8 @@ static ssize_t PostRead(CP_Services Svcs, Rdma_RS_Stream RS_Stream, int Rank, lo
17031703
"Remote read target is Rank %d (Offset = %zi, Length = %zi)\n", Rank, Offset,
17041704
Length);
17051705

1706-
/*
1707-
* The shm provider often returns -EAGAIN thousands of times.
1708-
* Yielding the thread after a certain number of attempts helps reduce context switches.
1709-
*/
1710-
size_t const batch_size = 2000;
1711-
size_t counter = 1;
17121706
do
17131707
{
1714-
if (counter++ >= batch_size)
1715-
{
1716-
sched_yield();
1717-
counter = 0;
1718-
}
1719-
++counter;
17201708
rc = fi_read(Fabric->signal, Buffer, Length, LocalDesc, SrcAddress, (uint64_t)Addr,
17211709
Info->Key, ret);
17221710
} while (rc == -EAGAIN);

0 commit comments

Comments
 (0)