----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2457/#review5447 -----------------------------------------------------------
I think this patch and corresponding wakeup event - and subsequent externalEvent at time zero - is complicating things for systemc patch (r/2458) when a checkpoint is being restored. Please see my comments on r/2458. - Cagdas Dirik On Sept. 29, 2014, 10:45 a.m., Andreas Hansson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2457/ > ----------------------------------------------------------- > > (Updated Sept. 29, 2014, 10:45 a.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 10454:4eab81289ed0 > --------------------------- > sim: EventQueue wakeup on events scheduled outside the event loop > > This patch adds a 'wakeup' member function to EventQueue which should be > called on an event queue whenever an event is scheduled on the event queue > from outside code within the call tree of the gem5 event loop. > > This clearly isn't necessary for normal gem5 EventQueue operation but > becomes the minimum necessary interface to allow hosting gem5's event loop > onto other schedulers where there may be calls into gem5 from external > code which schedules events onto an EventQueue between the current time and > the time of the next scheduled event. > > The use case I have in mind is a SystemC hosting where the event loop is: > > while (more events) { > wait(time_to_next_event or wakeup) > setCurTick > service events at this time > } > > where the 'wait' needs to be woken up if time_to_next_event becomes shorter > due to a scheduled event from SystemC arriving in a gem5 object. > > Requiring 'wakeup' to be called is a more efficient interface than > requiring all gem5 event scheduling actions to affect the host scheduler. > > This interface could be located elsewhere, say on another global object, > or by being passed by the host scheduler to objects which will schedule > such events, but it seems cleanest to put it on EventQueue as it is > actually a signal to the queue. > > EventQueue::wakeup is called for async_event events on event queue 0 as > it's only important that *some* queue be triggered for such events. > > > Diffs > ----- > > src/base/pollevent.cc 28b31101d9e6 > src/python/swig/pyevent.cc 28b31101d9e6 > src/sim/eventq.hh 28b31101d9e6 > src/sim/init_signals.cc PRE-CREATION > > Diff: http://reviews.gem5.org/r/2457/diff/ > > > Testing > ------- > > > Thanks, > > Andreas Hansson > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
