From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 1 07:32:33 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BB9F52B for ; Wed, 1 Apr 2015 07:32:33 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFE9FED4 for ; Wed, 1 Apr 2015 07:32:32 +0000 (UTC) Received: by iedfl3 with SMTP id fl3so40638974ied.1 for ; Wed, 01 Apr 2015 00:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LDv0R8OGXErn6vQj70Qr64SeeRUdO6Ca6c5v38yJvFc=; b=X+nlBQ/OoamdkstLyb5B5PTuRn4YOd7RIdrssTKPQG6fSUZneWBvJRqd5oq5h4Q+Hi L/3YoVClmtX08bA+oQG2huxkGvPm2nmiqybHbrH339XCqFklA9sKBzNcp3qbrD+0wiI2 F53wM+1+X/8G4owz5Xnlz2dSfwkkbQHnaahOY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=LDv0R8OGXErn6vQj70Qr64SeeRUdO6Ca6c5v38yJvFc=; b=NsD3wS+psO5oDxRTBK+99ZpbE/DOh3ler+7V2xHPOY0zw2owiMIgaams3uGEUEwj3Y cN7hjf8QFabUvR+29dOuXyruEiO9I9rGqcOqjoX+2nGDTlO6gO3CAgMpYngCLhGOQiI1 iSI6e/l/NFB9ZGSZ5xfQ/u3Dh/mGrk7ggXhciz+Sw4d1v5vUZA3i/EuOFgbzCYQKbA2J efXk1TRnqJ/heJw3ps1ih9nX0W099XlslSc+rLOpofk7FofkjqIbFjhikZtNKxwsLUkv 07cZMxeeooY8kffvsOFOrvFKd3I6oysM+FPAT1ygQ7A52XN/LxDLrVYYe4yiMcne6pID gsMA== X-Gm-Message-State: ALoCoQlcU0y5c5xdMZmiH0PuY4w29TktOv1OUYYmDsNRh05ZIpCWg6AbMfCzOLoSNV8Y5kiFmJkg X-Received: by 10.42.88.206 with SMTP id d14mr72371590icm.40.1427873552048; Wed, 01 Apr 2015 00:32:32 -0700 (PDT) Received: from sentient.dataix.local (107-133-113-194.lightspeed.milwwi.sbcglobal.net. [107.133.113.194]) by mx.google.com with ESMTPSA id m191sm761325ioe.23.2015.04.01.00.32.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Apr 2015 00:32:31 -0700 (PDT) Subject: Re: Uptime starts with one second Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset="utf8"; X-Pgp-Agent: GPGMail 2.5b6 From: Jason Hellenthal In-Reply-To: <551B9531.4040902@embedded-brains.de> Date: Wed, 1 Apr 2015 02:32:30 -0500 Content-Transfer-Encoding: 8bit Message-Id: <516B61EB-173D-44D8-B199-44E915738EF3@dataix.net> References: <551B9531.4040902@embedded-brains.de> To: Sebastian Huber X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 07:32:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Just a brief exploration of the source and a quick test, I yield no seen negative results… as of yet but changes are very minimal to a current updated 10-STABLE and have not tracked further if more may be needed. Index: sys/kern/kern_tc.c =================================================================== - --- sys/kern/kern_tc.c (revision 280928) +++ sys/kern/kern_tc.c (working copy) @@ -105,7 +105,7 @@ int tc_min_ticktock_freq = 1; volatile time_t time_second = 1; - -volatile time_t time_uptime = 1; +volatile time_t time_uptime = 0; struct bintime boottimebin; struct timeval boottime; On Apr 1, 2015, at 01:50, Sebastian Huber wrote: Hello, we port currently the FreeBSD timecounters to the RTEMS real-time operating system. https://devel.rtems.org/ticket/2271 On FreeBSD the uptime starts with one second. On RTEMS the uptime starts with zero seconds. I would like to preserve the existing behaviour and it would be easy to adjust kern_tc.c accordingly. The problem is that we also use the FreeBSD network stack and it uses for example (microuptime()). Has a uptime value of zero a special meaning inside the kernel so that we must not start at zero? - -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" - -- Jason Hellenthal Mobile: +1 (616) 953-0176 jhellenthal@DataIX.net JJH48-ARIN -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJVG58OAAoJEDLu+wRc4KcI+CUIAMZnulwHBIg497IVyI+wK47Y Hz3eaebuI0IxVadfFcRZMXgGNN30bSVkxN9BVQzcJ9FOOAYb1O3AyJNYWLJw1dA6 ilyF6jCV+uOtuXfBdxch/3ZzSHP4wtMO1JzL2YgG0KzQW71DsXnFlXE3mNveFQx8 QNHpsHNOMPdC4pyq/Ew6ltiBELzIa7LJqcPdnjh4cSzxVnVlihjta41FhbDh4+bO 7m087eXH8AuRUdK5sGOBRB26hgOB1iJhis2YwFucdlAytUfE26eFDJtbS8NOMSOo fiViLMcE1nsEXIdorg7o5vRIUzakFGfcqJlXxdmAGUGZ52B6E2jaDTN/0wnGVh8= =xYyK -----END PGP SIGNATURE-----