> On Aug. 16, 2016, 9:26 p.m., Mohammad Alian wrote:
> > Thanks for this fix. Just one issue that I think still is not resolved for
> > the termination of dist-gem5 simulations. Maybe Gabor also has an opinoin
> > on this.
> > When one of the gem5 processes (nodes) disconnects from message server
> > (switch), we need to kill the entire simulation (Please correct me if I'm
> > wrong). Then why we continue simulation if we receive an erroneous message
> > or connection gets closed in "TCPIface::recvTCP" function? Shoudn't we
> > terminate simulation at recvTCP function as well? E.g. simplyfying recvTCP
> > function to:
> >
> >
> > bool
> > TCPIface::recvTCP(int sock, void *buf, unsigned length)
> > {
> > ssize_t ret;
> >
> > ret = ::recv(sock, buf, length, MSG_WAITALL );
> > if (ret <= 0 || ret != length)
> > panic("recv() failed");
> >
> > return (ret == length);
> > }
The problem is that the receive thread may see a "socket closed" event during a
normal exit. That happens if the remote gem5 is faster to do the exit. We do
not want to trigger a panic in that case.
- Gabor
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3586/#review8642
-----------------------------------------------------------
On Aug. 4, 2016, 4:48 p.m., Michael LeBeane wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3586/
> -----------------------------------------------------------
>
> (Updated Aug. 4, 2016, 4:48 p.m.)
>
>
> Review request for Default.
>
>
> Repository: gem5
>
>
> Description
> -------
>
> Changeset 11552:24441a44d54e
> ---------------------------
> dev: Exit correctly in dist-gem5
> The receiver thread in dist_iface is allowed to directly exit the simulation.
> This can cause exit to be called twice if the main thread simultaneously wants
> to exit the simulation. Therefore, have the receiver thread enqueue a request
> to exit on the primary event queue for the main simulation thread to handle.
>
>
> Diffs
> -----
>
> src/dev/net/dist_iface.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c
> src/dev/net/tcp_iface.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c
>
> Diff: http://reviews.gem5.org/r/3586/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael LeBeane
>
>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev