From owner-freebsd-hackers@FreeBSD.ORG Sat May 30 05:42:58 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60C7DFF4 for ; Sat, 30 May 2015 05:42:58 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1FA1C29 for ; Sat, 30 May 2015 05:42:58 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id EBE7C3BD37; Sat, 30 May 2015 05:42:56 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.9/8.14.9) with ESMTP id t4TLclbd086244; Fri, 29 May 2015 21:38:47 GMT (envelope-from phk@freebsd.org) To: Sebastian Huber cc: freebsd-hackers@freebsd.org Subject: Re: Problem with timecounters and memory model In-reply-to: <1056382604.51315.1432925656612.JavaMail.zimbra@embedded-brains.de> From: "Poul-Henning Kamp" References: <55686300.3080100@embedded-brains.de> <85086.1432906578@critter.freebsd.dk> <55686C0F.9000101@embedded-brains.de> <85121.1432906871@critter.freebsd.dk> <55686D31.1060408@embedded-brains.de> <85619.1432920847@critter.freebsd.dk> <1056382604.51315.1432925656612.JavaMail.zimbra@embedded-brains.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86242.1432935527.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 29 May 2015 21:38:47 +0000 Message-ID: <86243.1432935527@critter.freebsd.dk> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2015 05:42:58 -0000 -------- In message <1056382604.51315.1432925656612.JavaMail.zimbra@embedded-brains= .de>, Sebastian Huber writes: >> If you only have one timehand, I can't see how it can work without >> locks ? > >In RTEMS we have two build time configurations: uni-processor and SMP. That makes sense. Please note that the default value of 10 timehands was a totally random number I pulled out of thin air. The number should be chosen on how long time a thread can expect to be preempted in kernel-mode, and since I suspect RTEMS to give quite different guarantees than FreeBSD/UNIX, you may want to think about that. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= .