From owner-freebsd-arch@FreeBSD.ORG Thu Dec 22 16:57:41 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE7D91065670; Thu, 22 Dec 2011 16:57:41 +0000 (UTC) (envelope-from s_sourceforge@nedprod.com) Received: from europe2.nedproductions.biz (unknown [IPv6:2a02:748:100:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id A44078FC1B; Thu, 22 Dec 2011 16:57:41 +0000 (UTC) Received: by europe2.nedproductions.biz (Postfix, from userid 1003) id CF5D59EE74C; Thu, 22 Dec 2011 16:57:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nedprod.com; s=mail; t=1324573060; bh=cGmdbyUvQ7gpsdJ/RJhi41u4Qt98ItuGuW5XFZg3iJw=; h=From:To:Date:MIME-Version:Subject:Message-ID:In-reply-to: References:Content-type:Content-transfer-encoding: Content-description; b=uKN510rTEAzskUQ6lY+eCqeByyZiePJ5OVwqZ0dNU3D1CAckkkNLoXA4qrONs+wWI qWPlZnIBBNqwHkSUK/BZCwQUU5RObXudyeG1HF7XzUEx8bJ0pG914Rq+l/CwJjnf50 BXLdGWFwsDC0nP6HSYejDkQswEKVN7aotT0gwDls= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on europe2.nedproductions.biz X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from [192.168.2.8] (dsl-076-041.cust.imagine.ie [87.232.76.41]) by europe2.nedproductions.biz (Postfix) with ESMTPSA id A64A79EE488; Thu, 22 Dec 2011 16:57:39 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nedprod.com; s=mail; t=1324573060; bh=cGmdbyUvQ7gpsdJ/RJhi41u4Qt98ItuGuW5XFZg3iJw=; h=From:To:Date:MIME-Version:Subject:Message-ID:In-reply-to: References:Content-type:Content-transfer-encoding: Content-description; b=uKN510rTEAzskUQ6lY+eCqeByyZiePJ5OVwqZ0dNU3D1CAckkkNLoXA4qrONs+wWI qWPlZnIBBNqwHkSUK/BZCwQUU5RObXudyeG1HF7XzUEx8bJ0pG914Rq+l/CwJjnf50 BXLdGWFwsDC0nP6HSYejDkQswEKVN7aotT0gwDls= From: "Niall Douglas" To: threads@freebsd.org, arch@freebsd.org Date: Thu, 22 Dec 2011 16:57:38 -0000 MIME-Version: 1.0 Message-ID: <4EF36182.29429.C1336CBC@s_sourceforge.nedprod.com> Priority: normal In-reply-to: <6CCA5C04-FC68-4B5F-911A-5F26EBFA296F@bsdimp.com> References: <78246.1324394062@critter.freebsd.dk>, <6CCA5C04-FC68-4B5F-911A-5F26EBFA296F@bsdimp.com> X-mailer: Pegasus Mail for Windows (4.62) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Cc: Subject: Re: [Patch] C1X threading support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 16:57:42 -0000 On 21 Dec 2011 at 10:22, Warner Losh wrote: > When time changes in the system, as it is wont to do occasionally, then > absolute time arguments will screw you. There's no way to get them > right that isn't a massively horrible kludge. Let's say you want to > sleep for no more than 1s. You get the time, add 1s to it, get > preempted, ntpd or somebody else notices the clocks are 1 year fast and > adjusts, you get a quatum again and make the call with a timeout now > 1-year in the future. > > What could possibly outweigh that negative? As I said earlier, I don't remember what the reason was. And no, that doesn't mean it wasn't important - there is a vast volume of stuff being thrown at you during standards, if you can remember something from even a month ago you're doing well. That's why all decisions are documented in depth so it can get looked up later. Instead of shouting at me - who is trying to help you - go look it up if it matters so much to you. However, if I had to take a guess, I'd say that functional reliability can be higher when you can offer guarantees. Absolute times have higher potential of guarantees than relative, whereas the opposite is not true, because you can draw lines in the sand with absolute times and that's much harder with relative. You can also implement relative using an API taking absolute easily, whereas again the opposite is harder. I can see arguments for very long lived systems where uptime is typically in years that absolute would be a lot more reliable due to relative period drift e.g. if I want to be woken on the hour every hour, you don't want to be using a relative wait. Of course, you can then pull the system time and calculate the delta, but I digress. The point is that more information supplied to the kernel is usually better. Absolute times supply more information than relative. So there you go - and please note this paragraph is my best guess, and may have nothing to do with committee opinion. Instead of people repeatedly whinging about the system clock moving - and yes, people on standards committees are aware that system clocks can move, as they are that different cores can have different system clocks - I would be asking how does your scheduler cope with the clock moving, and how should clock syncs interact with userland? Be engineers instead of children. Ask how to solve the problem instead of complaining about split milk. Be glad you're implementing this on a POSIX system and not a non-POSIX system. Be glad there aren't a million lines of new code being needed to achieve compliance. The standard is now written in stone and is a full ISO/IEC document. Your time for helping shape it is over - we're in errata and bug fixing stage now. You should have been whinging a year or two years ago - it's not like the standard is a surprise to anyone paying attention. Its release date was widely publicised and draft spec documents are freely available over the past 18 months. I might add the C11 spec passed its last meeting with no objection from any committee member. The ISO participants consider it finished. Niall -- Technology & Consulting Services - ned Productions Limited. http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no: 472909.