Re: [Linuxptp-users] Fw: “Resource temporarily unavailable” errors during flood ping test
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2012-10-31 00:02:37
|
> -----Original Message----- > From: Miroslav Lichvar [mailto:mli...@re...] > Sent: Tuesday, October 30, 2012 10:17 AM > To: lin...@li... > Subject: Re: [Linuxptp-users] Fw: “Resource temporarily unavailable” > errors during flood ping test > > On Tue, Oct 30, 2012 at 06:05:38PM +0100, Richard Cochran wrote: > > This does not accomplish anything since: > > > > --- /usr/include/asm-generic/errno.h --- > > > > #define EWOULDBLOCK EAGAIN /* Operation would block */ > > > > > > > usleep(1); > > > + try_again++; > > > > This is the wrong solution. The right way is to set the > > tx_timestamp_retries configuration variable to a higher number, like > > 200 or 2000 instead of the default of 2. > > Would it make sense to specify a timeout instead of number of retries > and use select()? > > -- > Miroslav Lichvar I did some digging in the kernel to figure out why exceptfs parameter didn't get wokenup when a message appeared on the error queue. Turns out that is because in fs/socket.c the POLLEX_SET flags only includes POLL_PRI and not POLL_ERR. I tried a modified kernel which defined POLLEX_SET (POLL_PRI | POLL_ERR) and it enabled the usecase we want. Sadly this would add a further dependency.. and probably can't really be changed.. I don't know why exceptfs which is documented as "wake a socket on error" doesn't check POLL_ERR flag.... it seems really silly. - Jake |