----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2036/#review4766 -----------------------------------------------------------
Ship it! seems fine to me, but would be nice to get Nate's opinion since he wrote this originally - Ali Saidi On Oct. 7, 2013, 2:10 p.m., Andreas Sandberg wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2036/ > ----------------------------------------------------------- > > (Updated Oct. 7, 2013, 2:10 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 9907:6b8977951300 > --------------------------- > base: Fix race in PollQueue and remove SIGALRM workaround > > There is a race between enabling asynchronous IO for a file descriptor > and IO events happening on that descriptor. A SIGIO won't normally be > delivered if an event is pending when asynchronous IO is > enabled. Instead, the signal will be raised the next time there is an > event on the FD. This changeset simulates a SIGIO by setting the > async_io flag when setting up asynchronous IO for an FD. This causes > the main event loop to poll all file descriptors to check for pending > IO. As a consequence of this, the old SIGALRM hack should no longer be > needed and is therefore removed. > > > Diffs > ----- > > src/base/pollevent.cc 2a7c8ec11cff > src/sim/async.hh 2a7c8ec11cff > src/sim/async.cc 2a7c8ec11cff > src/sim/init.cc 2a7c8ec11cff > src/sim/simulate.cc 2a7c8ec11cff > > Diff: http://reviews.gem5.org/r/2036/diff/ > > > Testing > ------- > > Ran on x86 with KVM. Verified that asynchronous sockets work (terminal). > Verified that IO happening before enabling asynchronous triggers a poll in > the next iteration of the event loop (this was not the case before without > the SIGALRM hack). > > > Thanks, > > Andreas Sandberg > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
