Re: Question about socket timeouts

2013-08-27 Thread Vitja Makarov
check, I've changed a bit because the 'integer' part of sbintime_t fits in 32-bits, but I'm not sure it's the best way of doing this. Nice, that worked for me! I got ~26ms timeouts in average on my VM. On Fri, Aug 23, 2013 at 7:04 AM, Vitja Makarov vitja.maka...@gmail.com wrote: 2013/8/23

Re: Question about socket timeouts

2013-08-23 Thread Vitja Makarov
2013/8/22 John Baldwin j...@freebsd.org: On Thursday, August 22, 2013 12:18:48 am Vitja Makarov wrote: 2013/8/21 John Baldwin j...@freebsd.org: On Monday, August 19, 2013 11:13:02 pm Daniel Eischen wrote: On Mon, 19 Aug 2013, Adrian Chadd wrote: Yes! Please file a PR! This sorta

Re: Question about socket timeouts

2013-08-23 Thread Vitja Makarov
2013/8/23 Davide Italiano dav...@freebsd.org: On Fri, Aug 23, 2013 at 3:45 PM, John Baldwin j...@freebsd.org wrote: On Friday, August 23, 2013 2:27:58 am Vitja Makarov wrote: 2013/8/22 John Baldwin j...@freebsd.org: On Thursday, August 22, 2013 12:18:48 am Vitja Makarov wrote: 2013/8/21

Question about socket timeouts

2013-08-19 Thread Vitja Makarov
Hi! Recently I was playing with small socket timeouts. setsockopt(2) SO_RCVTIMEO and found a problem with it: if timeout is small enough read(2) may return before timeout is actually expired. I was unable to reproduce this on linux box. I found that kernel uses a timer with 1/HZ precision so it