Hi,

Actually, I don't think the alarm event is needed. It is indeed forcing a check of all the file descriptors every second, but they should be setup to deliver SIGIOs on activity. So, my best guess is that this is a workaround that fixes a (rare) race condition between registering a file descriptor with the PollQueue (and enabling SIGIOs) and receiving and event on the FD. If this is the case (I'm not sure if the kernel raises a signal when enabling async IO if there is pending activity), it could easily be fixed by adding a poll of the FD after registering it and setting async_event & async_io if there is activity.

In practice, I've been running without any of the alarm stuff enabled for a couple of months and it seems to work.

//Andreas

On 05/13/2013 08:02 PM, Ali Saidi wrote:
Hi Uday,

The alarm event is used to check if any of the sockets that gem5 is
waiting on have any activity (e.g. gem5 terminal, vnc server, ...). If
you don't want to connect anything to a running process it probably
isn't necessary, and if you do you could probably come up with an
alternate solution if it's causing you a lot of trouble.

Ali

On 13.05.2013 06:25, Ranga, L Udaya wrote:

Hi,

Can anyone please clarify why alarm(1) is coded in
gem5/src/base/pollevent.cc (line 246)?

In my simulation framework, this causes the simulation to advance
slightly. I need to know whether this call is essential or I can
bypass it.

Thanks,

Uday


_______________________________________________
gem5-users mailing list
[email protected]  <mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users



_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to