From owner-freebsd-current@FreeBSD.ORG Tue Aug 27 05:10:18 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41158371; Tue, 27 Aug 2013 05:10:18 +0000 (UTC) (envelope-from vitja.makarov@gmail.com) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [IPv6:2607:f8b0:400c:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF34D2AFD; Tue, 27 Aug 2013 05:10:17 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id h10so2712870vbh.34 for ; Mon, 26 Aug 2013 22:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TkmbD9KWNuKjO6DVtlPMl7QPVGf5N3MWVpLZk0vV4Vc=; b=NFTtskuLmn/bHpNmg6XKzSRJiGGQXAC2CFXQyxEuIIINR5oYweI4lGawyuq18ED9dd MTcZYOCd7nUiKyw5HgY+Me7UNFbXPhazKcT2XdT+0w+jtCrUmqwp3FgHXs9LnJyjL+oj 0YRgS+Wf86FAAnIQ72ZXG3LTHA6LkGn9x68UhbEdTiR0EcThnLmEr6rEIahj+HCSeZIs 7mN4nLc53vm1ii1/B/UmHkUk9YKNMGNdVdL0vltilBqevS5kA7Znahv22qs1BNHFczED grV5nB6SJGX63LsIqKUvACQTmVsJgfl2IkWZKNFTtg66VC3pyKSIAa82N+V+3OoH2O2m HBuA== MIME-Version: 1.0 X-Received: by 10.220.186.202 with SMTP id ct10mr18648408vcb.14.1377580216889; Mon, 26 Aug 2013 22:10:16 -0700 (PDT) Received: by 10.52.27.51 with HTTP; Mon, 26 Aug 2013 22:10:16 -0700 (PDT) In-Reply-To: References: <201308221408.08203.jhb@freebsd.org> <201308230945.28701.jhb@freebsd.org> Date: Tue, 27 Aug 2013 09:10:16 +0400 Message-ID: Subject: Re: Question about socket timeouts From: Vitja Makarov To: Davide Italiano Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Tue, 27 Aug 2013 11:24:48 +0000 Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 05:10:18 -0000 2013/8/26 Davide Italiano : > Please consider the following patch: > http://people.freebsd.org/~davide/review/socket_timeout.diff > I've tested it and it works OK. I got a timeout which is ~= 25ms using > the testcase provided by the user. > The only doubt I have is about the range 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 wrote: >> 2013/8/23 Davide Italiano : >> >> I think that for socket's timeouts it's ok to have a HZ-precision. It >> would be much more important to implement high-precision timeouts for >> select() and friends, if it's not done yet (sorry I'm running 9.1). >> > > JFYI, select()/usleep()/etc... are all fine grained right now in HEAD. > That's cool! Does that mean that FreeBSD 10 would be a tickless system? -- vitja.