From owner-freebsd-hackers@freebsd.org Mon Sep 30 10:30:21 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 581101234C0 for ; Mon, 30 Sep 2019 10:30:21 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from MailHost (unknown [80.211.33.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46hdvd01j1z4gG4 for ; Mon, 30 Sep 2019 10:30:20 +0000 (UTC) (envelope-from salvadore@FreeBSD.org) Received: from root (uid 0) (envelope-from salvadore@FreeBSD.org) id 2619d by MailHost (DragonFly Mail Agent v0.11+); Mon, 30 Sep 2019 12:25:10 +0200 To: freebsd-hackers@FreeBSD.org Subject: Call for 2019Q3 quarterly status reports Date: Mon, 30 Sep 2019 12:25:10 +0200 Message-Id: <5d91d806.2619d.6b14011c@MailHost> From: X-Rspamd-Queue-Id: 46hdvd01j1z4gG4 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; ASN(0.00)[asn:31034, ipnet:80.211.0.0/17, country:IT]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2019 10:30:21 -0000 Dear FreeBSD Community, The deadline for the next FreeBSD Quarterly Status update is October 31, 2019, for work done since the last round of Quarterly Reports: July, 2019 – September, 2019. Status report submissions do not need to be very long. They may be about anything happening in the FreeBSD project and community, and provide a great way to inform FreeBSD users and developers about work that is underway or has been completed. Report submissions are not limited to committers; anyone doing anything interesting and FreeBSD related can -- and should -- write one! The preferred method is to follow the guidelines at the Quarterly GitHub repository: https://github.com/freebsd/freebsd-quarterly Alternatively you can fetch the Markdown template, fill it in, and email it to quar...@FreeBSD.org. The template can be found at: https://raw.githubusercontent.com/freebsd/freebsd-quarterly/master/report-sample.md The old XML generator and templates are no longer used. We look forward to seeing your 2019Q3 reports! Thanks, Lorenzo Salvadore (on behalf of quarterly@) From owner-freebsd-hackers@freebsd.org Tue Oct 1 10:48:54 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FCCB132F56 for ; Tue, 1 Oct 2019 10:48:54 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jGGX2yQvz3DbJ for ; Tue, 1 Oct 2019 10:48:52 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from sslproxy01.your-server.de ([88.198.220.130]) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iFFi5-0004YZ-4D for freebsd-hackers@freebsd.org; Tue, 01 Oct 2019 12:48:49 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iFFi4-0004DB-QW for freebsd-hackers@freebsd.org; Tue, 01 Oct 2019 12:48:48 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 50FD62A165B for ; Tue, 1 Oct 2019 12:48:49 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fYQVpNsV3fJP for ; Tue, 1 Oct 2019 12:48:48 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id D4F9E2A1681 for ; Tue, 1 Oct 2019 12:48:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id v7TaIrL_-2wd for ; Tue, 1 Oct 2019 12:48:48 +0200 (CEST) Received: from huber-nb-linux.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTPSA id B460C2A165B for ; Tue, 1 Oct 2019 12:48:48 +0200 (CEST) To: FreeBSD From: Sebastian Huber Subject: Make timehands count selectable at boottime? Message-ID: <0d534569-504f-52c2-f09c-b977fe80843d@embedded-brains.de> Date: Tue, 1 Oct 2019 12:48:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.101.4/25589/Tue Oct 1 10:30:33 2019) X-Rspamd-Queue-Id: 46jGGX2yQvz3DbJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sebastian.huber@embedded-brains.de designates 85.10.215.148 as permitted sender) smtp.mailfrom=sebastian.huber@embedded-brains.de X-Spamd-Result: default: False [-1.32 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_SEVEN(0.00)[8]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:85.10.215.148]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.98)[-0.978,0]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[148.215.10.85.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_MEDIUM(-0.92)[-0.925,0]; IP_SCORE(-0.11)[ipnet: 85.10.192.0/18(1.23), asn: 24940(-1.79), country: DE(-0.01)]; DMARC_NA(0.00)[embedded-brains.de]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:24940, ipnet:85.10.192.0/18, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; HAS_X_AS(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 10:48:54 -0000 Hello, a recent commit made the timehands count selectable at boottime: https://reviews.freebsd.org/D21563 What was the reason for this change? --=20 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=C3=A4ftliche Mitteilung im Sinne des EHUG= . From owner-freebsd-hackers@freebsd.org Tue Oct 1 11:11:23 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56BA9133A0B for ; Tue, 1 Oct 2019 11:11:23 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jGmV4YT8z3G1L for ; Tue, 1 Oct 2019 11:11:22 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from sslproxy01.your-server.de ([88.198.220.130]) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iFG3r-0005N6-IW for freebsd-hackers@freebsd.org; Tue, 01 Oct 2019 13:11:19 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iFG3r-0000PE-9F for freebsd-hackers@freebsd.org; Tue, 01 Oct 2019 13:11:19 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id A411E2A165B for ; Tue, 1 Oct 2019 13:11:20 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id FINcRkCemtpy for ; Tue, 1 Oct 2019 13:11:20 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 5C9462A1681 for ; Tue, 1 Oct 2019 13:11:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uABTGnv0FeO2 for ; Tue, 1 Oct 2019 13:11:20 +0200 (CEST) Received: from huber-nb-linux.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 37C3A2A165B for ; Tue, 1 Oct 2019 13:11:20 +0200 (CEST) To: FreeBSD From: Sebastian Huber Subject: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> Date: Tue, 1 Oct 2019 13:11:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.101.4/25589/Tue Oct 1 10:30:33 2019) X-Rspamd-Queue-Id: 46jGmV4YT8z3G1L X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sebastian.huber@embedded-brains.de designates 85.10.215.148 as permitted sender) smtp.mailfrom=sebastian.huber@embedded-brains.de X-Spamd-Result: default: False [-1.31 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_SEVEN(0.00)[8]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:85.10.215.148:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[embedded-brains.de]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.98)[-0.979,0]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; IP_SCORE(-0.13)[ipnet: 85.10.192.0/18(1.17), asn: 24940(-1.79), country: DE(-0.01)]; RCVD_IN_DNSWL_NONE(0.00)[148.215.10.85.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_MEDIUM(-0.91)[-0.909,0]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:85.10.192.0/18, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; HAS_X_AS(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 11:11:23 -0000 Hello, since this commit https://github.com/freebsd/freebsd/commit/307f787e5a7f tc_get_timecount() is called two times in tc_init(). /* * Initialize a new timecounter and possibly use it. */ void tc_init(struct timecounter *tc) { [...] if (tc->tc_quality =3D=3D timecounter->tc_quality && tc->tc_frequency < timecounter->tc_frequency) return; (void)tc->tc_get_timecount(tc); (void)tc->tc_get_timecount(tc); timecounter =3D tc; } What is the reason for this procedure? --=20 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=C3=A4ftliche Mitteilung im Sinne des EHUG= . From owner-freebsd-hackers@freebsd.org Tue Oct 1 14:37:40 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9474137FB4 for ; Tue, 1 Oct 2019 14:37:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jMLW4dfGz3wkZ for ; Tue, 1 Oct 2019 14:37:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x91EbImJ098888 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 1 Oct 2019 17:37:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x91EbImJ098888 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x91EbIe9098887; Tue, 1 Oct 2019 17:37:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Oct 2019 17:37:18 +0300 From: Konstantin Belousov To: Sebastian Huber Cc: FreeBSD Subject: Re: Make timehands count selectable at boottime? Message-ID: <20191001143718.GU44691@kib.kiev.ua> References: <0d534569-504f-52c2-f09c-b977fe80843d@embedded-brains.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d534569-504f-52c2-f09c-b977fe80843d@embedded-brains.de> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46jMLW4dfGz3wkZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[ip: (-2.64), ipnet: 2001:470::/32(-4.52), asn: 6939(-3.33), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 14:37:40 -0000 On Tue, Oct 01, 2019 at 12:48:46PM +0200, Sebastian Huber wrote: > Hello, > > a recent commit made the timehands count selectable at boottime: > > https://reviews.freebsd.org/D21563 > > What was the reason for this change? See the followup thread on the svn-src@ list for this revision. From owner-freebsd-hackers@freebsd.org Wed Oct 2 06:48:39 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E35F12402F for ; Wed, 2 Oct 2019 06:48:39 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jmtt1Wcbz3NMY for ; Wed, 2 Oct 2019 06:48:37 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from sslproxy01.your-server.de ([88.198.220.130]) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iFYR8-0005Ol-Hh; Wed, 02 Oct 2019 08:48:34 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iFYR8-00008V-9F; Wed, 02 Oct 2019 08:48:34 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 956392A165B; Wed, 2 Oct 2019 08:48:36 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8wL4M8fmTZA8; Wed, 2 Oct 2019 08:48:36 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 3C0A02A1681; Wed, 2 Oct 2019 08:48:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zYEd_ZRbiNY5; Wed, 2 Oct 2019 08:48:36 +0200 (CEST) Received: from huber-nb-linux.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 1E6772A165B; Wed, 2 Oct 2019 08:48:36 +0200 (CEST) Subject: Re: Make timehands count selectable at boottime? To: Konstantin Belousov Cc: FreeBSD References: <0d534569-504f-52c2-f09c-b977fe80843d@embedded-brains.de> <20191001143718.GU44691@kib.kiev.ua> From: Sebastian Huber Message-ID: Date: Wed, 2 Oct 2019 08:48:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191001143718.GU44691@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.101.4/25589/Tue Oct 1 10:30:33 2019) X-Rspamd-Queue-Id: 46jmtt1Wcbz3NMY X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sebastian.huber@embedded-brains.de designates 85.10.215.148 as permitted sender) smtp.mailfrom=sebastian.huber@embedded-brains.de X-Spamd-Result: default: False [-1.37 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_SEVEN(0.00)[8]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:85.10.215.148]; IP_SCORE(-0.14)[ipnet: 85.10.192.0/18(1.12), asn: 24940(-1.79), country: DE(-0.01)]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[embedded-brains.de]; NEURAL_HAM_LONG(-1.00)[-0.995,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[148.215.10.85.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_MEDIUM(-0.94)[-0.938,0]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:24940, ipnet:85.10.192.0/18, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; HAS_X_AS(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2019 06:48:39 -0000 On 01/10/2019 16:37, Konstantin Belousov wrote: > On Tue, Oct 01, 2019 at 12:48:46PM +0200, Sebastian Huber wrote: >> Hello, >> >> a recent commit made the timehands count selectable at boottime: >> >> https://reviews.freebsd.org/D21563 >> >> What was the reason for this change? >=20 > See the followup thread on the svn-src@ list for this revision. Thanks for the hint. So, this change is related to the PPS handling and=20 the things which happen between a pps_capture() and pps_event(). What I don't understand is why more timehands are a problem for the=20 consumer side. For example: void binuptime(struct bintime *bt) { struct timehands *th; u_int gen; do { th =3D timehands; gen =3D atomic_load_acq_int(&th->th_generation); *bt =3D th->th_offset; bintime_addx(bt, th->th_scale * tc_delta(th)); atomic_thread_fence_acq(); } while (gen =3D=3D 0 || gen !=3D th->th_generation); } With more timehands the time frame in which th->th_generation remains=20 constant is longer the more timehands you have. So, it is less likely=20 that you have to execute the loop body twice. The count of timehands is=20 limited by the timecounter frequency and mask, and the hz configuration. --=20 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=C3=A4ftliche Mitteilung im Sinne des EHUG= . From owner-freebsd-hackers@freebsd.org Wed Oct 2 14:00:50 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F162212FD82 for ; Wed, 2 Oct 2019 14:00:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jyTY4nBXz4SK0; Wed, 2 Oct 2019 14:00:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x92E0e3O035242 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 2 Oct 2019 17:00:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x92E0e3O035242 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x92E0enp035241; Wed, 2 Oct 2019 17:00:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Oct 2019 17:00:40 +0300 From: Konstantin Belousov To: Sebastian Huber Cc: FreeBSD , bde@freebsd.org Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <20191002140040.GA44691@kib.kiev.ua> References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46jyTY4nBXz4SK0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; IP_SCORE(0.00)[ip: (-2.72), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; R_SPF_SOFTFAIL(0.00)[~all:c]; IP_SCORE_FREEMAIL(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2019 14:00:51 -0000 On Tue, Oct 01, 2019 at 01:11:18PM +0200, Sebastian Huber wrote: > Hello, > > since this commit > > https://github.com/freebsd/freebsd/commit/307f787e5a7f > It is not very useful to pass github hashes around. I think that the addition of the second tc_get_timecount() was done earlier, in r95530, and there it has semi-useful comment + /* Warm up new timecounter. */ + (void)newtc->tc_get_timecount(newtc); + (void)newtc->tc_get_timecount(newtc); The commit message is not helpful at all. I do not see a timecounter which would need two get_timecount() calls to start working properly now, but I can imagine that at time it was. I added Bruce to Cc: to may be get more context and explanation. > tc_get_timecount() is called two times in tc_init(). > > /* > * Initialize a new timecounter and possibly use it. > */ > void > tc_init(struct timecounter *tc) > { > [...] > if (tc->tc_quality == timecounter->tc_quality && > tc->tc_frequency < timecounter->tc_frequency) > return; > (void)tc->tc_get_timecount(tc); > (void)tc->tc_get_timecount(tc); > timecounter = tc; > } > > What is the reason for this procedure? > > -- > 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 > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Wed Oct 2 14:05:32 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39B9A130082 for ; Wed, 2 Oct 2019 14:05:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jyZz1s1Pz4Sqy for ; Wed, 2 Oct 2019 14:05:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x92E5NDj036059 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 2 Oct 2019 17:05:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x92E5NDj036059 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x92E5NtI036058; Wed, 2 Oct 2019 17:05:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Oct 2019 17:05:23 +0300 From: Konstantin Belousov To: Sebastian Huber Cc: FreeBSD Subject: Re: Make timehands count selectable at boottime? Message-ID: <20191002140523.GB44691@kib.kiev.ua> References: <0d534569-504f-52c2-f09c-b977fe80843d@embedded-brains.de> <20191001143718.GU44691@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46jyZz1s1Pz4Sqy X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; IP_SCORE(0.00)[ip: (-2.71), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; R_SPF_SOFTFAIL(0.00)[~all:c]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2019 14:05:32 -0000 On Wed, Oct 02, 2019 at 08:48:33AM +0200, Sebastian Huber wrote: > On 01/10/2019 16:37, Konstantin Belousov wrote: > > On Tue, Oct 01, 2019 at 12:48:46PM +0200, Sebastian Huber wrote: > >> Hello, > >> > >> a recent commit made the timehands count selectable at boottime: > >> > >> https://reviews.freebsd.org/D21563 > >> > >> What was the reason for this change? > > > > See the followup thread on the svn-src@ list for this revision. > > Thanks for the hint. So, this change is related to the PPS handling and > the things which happen between a pps_capture() and pps_event(). Well, it is my reaction to the reports that there might be issues for some people. Apparently, the PPS issues were fixed by other means, see r352196. > > What I don't understand is why more timehands are a problem for the > consumer side. For example: > > void > binuptime(struct bintime *bt) > { > struct timehands *th; > u_int gen; > > do { > th = timehands; > gen = atomic_load_acq_int(&th->th_generation); > *bt = th->th_offset; > bintime_addx(bt, th->th_scale * tc_delta(th)); > atomic_thread_fence_acq(); > } while (gen == 0 || gen != th->th_generation); > } > > With more timehands the time frame in which th->th_generation remains > constant is longer the more timehands you have. So, it is less likely > that you have to execute the loop body twice. The count of timehands is > limited by the timecounter frequency and mask, and the hz configuration. And then the timehands you are looking at might be more stale. Ideally we would use one timehands, making the readers spin while update is done, but the fear is that the spin is too long for SMP, and that UP would suffer up to deadlock. From owner-freebsd-hackers@freebsd.org Wed Oct 2 16:39:57 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA8801336FF for ; Wed, 2 Oct 2019 16:39:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46k2185cQRz4g0k for ; Wed, 2 Oct 2019 16:39:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x92Gdkc7073201 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 2 Oct 2019 19:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x92Gdkc7073201 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x92GdkIS073200; Wed, 2 Oct 2019 19:39:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Oct 2019 19:39:46 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Sebastian Huber , FreeBSD Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <20191002163946.GE44691@kib.kiev.ua> References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003013314.O2151@besplex.bde.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46k2185cQRz4g0k X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; IP_SCORE(0.00)[ip: (-2.68), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; R_SPF_SOFTFAIL(0.00)[~all:c]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_TO(0.00)[optusnet.com.au]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2019 16:39:57 -0000 On Thu, Oct 03, 2019 at 02:25:46AM +1000, Bruce Evans wrote: > On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > On Tue, Oct 01, 2019 at 01:11:18PM +0200, Sebastian Huber wrote: > >> Hello, > >> > >> since this commit > >> > >> https://github.com/freebsd/freebsd/commit/307f787e5a7f > >> > > It is not very useful to pass github hashes around. > > > > I think that the addition of the second tc_get_timecount() was done > > earlier, in r95530, and there it has semi-useful comment > > + /* Warm up new timecounter. */ > > + (void)newtc->tc_get_timecount(newtc); > > + (void)newtc->tc_get_timecount(newtc); > > > > The commit message is not helpful at all. > > The comment was correct when I added it in r48887. Then it was only > attached to the first tc_get_timecounter() call which is necessary to > start up or sync the hardware timecounter in some cases, e.g., for the > i8254. After the warmup, r48887 called the preexisting function > tc_switch_timecount() switch the software state. This function was > unused (ifdefed out) but required only minor modifications. > > r95530 removes tc_switch_timecount() and replaces it by a second call > to tc_get_timecounter() and an assignment of the new timecounter pointer > to the active timecounter pointer, and removes the blank line that > separates the warmup from the application. The second call and the > assignment are all that is left of the function after moving its > initialization. > > The second warmup looks like nonsense in both versions, and it is > unclear how activation by plain assignment can work in the second > version (the first version was in FreeBSD-3 or 4 and was locked by > splclock()). The assignment is sloppy about memory ordering. The > second warmup may have helped by accidentally forcing the assignment > to be after the first warmup. (Some timecounters that need at least > 1 warmup, e.g., the i854, use atomic ops that accidentally give > sufficient ordering.) Later work on ordering may have reduced the > sloppiness. > > > I do not see a timecounter which would need two get_timecount() calls > > to start working properly now, but I can imagine that at time it was. > > I think it never helped much. For the TSC, the 2 calls are ordered only > relatively each other on a single CPU. They are not ordered relative to > memory. For the i8254, 1 call is enough. The ACPI timer does hardware > accesses so it is in between. So the conclusion is that the second call can be removed, am I right ? > > > I added Bruce to Cc: to may be get more context and explanation. > > > >> tc_get_timecount() is called two times in tc_init(). > >> > >> /* > >> * Initialize a new timecounter and possibly use it. > >> */ > >> void > >> tc_init(struct timecounter *tc) > >> { > >> [...] > >> if (tc->tc_quality == timecounter->tc_quality && > >> tc->tc_frequency < timecounter->tc_frequency) > >> return; > >> (void)tc->tc_get_timecount(tc); > >> (void)tc->tc_get_timecount(tc); > >> timecounter = tc; > >> } > >> > >> What is the reason for this procedure? > > Bruce From owner-freebsd-hackers@freebsd.org Thu Oct 3 03:31:00 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32274FDAD7 for ; Thu, 3 Oct 2019 03:31:00 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail03.asahi-net.or.jp (mail03.asahi-net.or.jp [202.224.55.15]) by mx1.freebsd.org (Postfix) with ESMTP id 46kJSJ54yPz4Nqf for ; Thu, 3 Oct 2019 03:30:55 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from vmware.advok.com (cpe-184-152-96-96.nj.res.rr.com [184.152.96.96]) (Authenticated sender: NR2Y-OOT) by mail03.asahi-net.or.jp (Postfix) with ESMTPSA id 899D3699DC for ; Thu, 3 Oct 2019 12:30:49 +0900 (JST) Date: Wed, 2 Oct 2019 16:31:41 -0400 From: Yoshihiro Ota To: freebsd-hackers@freebsd.org Subject: Can multiple vm_pages refer to a same swap device page? Message-Id: <20191002163141.1b88c3417e561c37624643b9@j.email.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i386-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46kJSJ54yPz4Nqf X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ota@j.email.ne.jp designates 202.224.55.15 as permitted sender) smtp.mailfrom=ota@j.email.ne.jp X-Spamd-Result: default: False [3.97 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:202.224.55.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.94)[0.944,0]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; MV_CASE(0.50)[]; NEURAL_SPAM_LONG(0.87)[0.867,0]; DMARC_NA(0.00)[email.ne.jp]; IP_SCORE(0.96)[ip: (0.65), ipnet: 202.224.32.0/19(0.21), asn: 4685(3.94), country: JP(-0.01)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[15.55.224.202.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:4685, ipnet:202.224.32.0/19, country:JP]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[96.96.152.184.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 03:31:00 -0000 Hi forks, Given a process can allocate lot of memory even cosuming swap space, then fork a child process, and both parent and child processes stay live while doing differen things, I expect a system needs to track how many processes are refering to same swap pages. How does FreeBSD keep track of multiple processes refering to same swap pages? Is it by multiple vm_page objects pointing to same swap device pages with daddr_t? I've been looking around swap_pager.h, vm_page, vm_object, struct swblk, and struct swdevt but I don't find reference count for swap device pages. Am I missing something? Regards, Hiro From owner-freebsd-hackers@freebsd.org Thu Oct 3 08:23:18 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 979C812DA81 for ; Thu, 3 Oct 2019 08:23:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kQxd2d09z3JQM for ; Thu, 3 Oct 2019 08:23:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tyZeIOAVM1m0P2hYq9NDcwavr08r77QFrv5pyne3f7r0FE_wvMMD8HSZFuM7nWv fF2CoAdtf3l4cWjmM95NfxxxspxyVF3IlFfuEd8Usq0zVP2ZkUSy3YSeLkhB4yVKRB93fpBka5kK GF98jFRCf5hdlZNlbR.t6XquRRmwVVvrTt_ZSwiX1x3iVMtKDwg0zIEt6TC276ljdDcZaKRkUurX NsUtQlBkBTCD1P486NHRW4e9tmLwdrLgh5v9lLCQsIiH9BSKU_0y1g_ad7bk_pwxKQEkGtmCIdN2 Kq3Si7Kb_47uqm0pp_ofecSev.qkJntvQ_nsb_rELYRt3c6Fkod6e.8B7iDql_VTc1IbQYfTBfKy EuNo3byGqE05SybepAtHwz_OgzLh15QrVl.QZX0D95b7BuQJdEiBNbaOeC61vrAM0Iskhnax0LFq GmWHlRVXGX4PlZdQQETOvLeKSZcAkJx2ZlTbGuU5Xa422oSPH5JPCqY.IG4mWUGoCBUXHeqY_TNh 08pby5lsuiCYMGxWYwtHhv2o1ir1K4ARnvtQWZXI1yK1GF5o9hbd3RrD7lsY6_TJ61.V5rF8VABf J9hUIozAqchiX.MA0G_ah8p9_XLfGErbUHxudZ.uUoBsE_q4W7vQ5nJxgJzpk5R9AHF7Rmq1GcOo JhtwkMhlpmoLK0IYtANrYDWGOf91PA9_ok5mUIn97ZNzTToP.KdLHlXXPR91l1.7.knRcv.vMZy2 yk0R9rtvrWmGzfrN5udgY9C2PUtndZCiSt.72RySjunXefh5ncBax6brPFqD0h6AeHfAFRIgM.7x 8hKqnJprfmZg1m4lth2wos.l6SN5bFrDgAJveZh_LcYlSUsQrTfDWx2J33mDtFKGteSEcwJKZpMj C7GovwejKKOV9LClVNi1AqCfZUtcxbe6s_ebl.AhQMA5OnhUV_NO8j3bCM10qKsbpEEyb1pXz.2a yNCF2_R1zqaXorqgRJcf5ZhO1DmCfT9mYEspylk8W0b9u2_aBDwuzb9q.ACpORQL_VdWUrkEYa_j 6KI._IKJoEhp5Mw0.V3sehG4P.sUNmSQ_kcrZArE2ppr67tgt76a.oRyG9uPs4U0.jXLRoDP8_Wu unACc3rtECqBVpui562f36vsT9mW472CZktON8g5b7oRlhA3ItbVy1MiVMU.KIFTTqh9yHOBXseK S_XHWhNDlpvNRFaASJuNeLhil_o0T7o2Vfd9vAVlsS_U9iP31E6VmMDOfpVXrELufWcG0_GhbKfa 5Gm1WXWWGizyO9y3bDp8pceJ3Imb9wbGHAbTIuxznHE6FAey1JK0Xlm0Ror1JHaDxmWk2Hkbs9c5 _ Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Thu, 3 Oct 2019 08:23:12 +0000 Received: by smtp418.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 573bfdeb1999dd393bb232fb53237c2b; Thu, 03 Oct 2019 08:23:10 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-Id: Date: Thu, 3 Oct 2019 01:23:10 -0700 To: freebsd-hackers@freebsd.org, Konstantin Belousov X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 46kQxd2d09z3JQM X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.34 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (6.50), ipnet: 98.137.64.0/21(0.94), asn: 36647(0.75), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.98)[0.985,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.86)[0.858,0]; RCVD_IN_DNSWL_NONE(0.00)[82.68.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 08:23:18 -0000 Konstantin Belousov kostikbel at gmail.com wrote on Wed Oct 2 16:39:57 UTC 2019 : > On Thu, Oct 03, 2019 at 02:25:46AM +1000, Bruce Evans wrote: > > On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > > > . . . > > > > > > I think that the addition of the second tc_get_timecount() was done > > > earlier, in r95530, and there it has semi-useful comment > > > + /* Warm up new timecounter. */ > > > + (void)newtc->tc_get_timecount(newtc); > > > + (void)newtc->tc_get_timecount(newtc); > . . . > > I think it never helped much. For the TSC, the 2 calls are ordered only > > relatively each other on a single CPU. They are not ordered relative to > > memory. For the i8254, 1 call is enough. The ACPI timer does hardware > > accesses so it is in between. > So the conclusion is that the second call can be removed, am I right ? A fair amount of the material written seemed amd64/i384 specific history and I expect that this is machine independent code. So I'll explicitly ask: Can all the FreeBSD architectures currently get by without the dual (void)newtc->tc_get_timecount(newtc) ? === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Thu Oct 3 08:33:22 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24E0912DE22 for ; Thu, 3 Oct 2019 08:33:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kR9F1NJ5z3K27 for ; Thu, 3 Oct 2019 08:33:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x938XCv4094842 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Oct 2019 11:33:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x938XCv4094842 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x938XBcJ094840; Thu, 3 Oct 2019 11:33:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Oct 2019 11:33:11 +0300 From: Konstantin Belousov To: Yoshihiro Ota Cc: freebsd-hackers@freebsd.org Subject: Re: Can multiple vm_pages refer to a same swap device page? Message-ID: <20191003083311.GH44691@kib.kiev.ua> References: <20191002163141.1b88c3417e561c37624643b9@j.email.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191002163141.1b88c3417e561c37624643b9@j.email.ne.jp> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46kR9F1NJ5z3K27 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[ip: (-2.67), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 08:33:22 -0000 On Wed, Oct 02, 2019 at 04:31:41PM -0400, Yoshihiro Ota wrote: > Hi forks, > > Given a process can allocate lot of memory even cosuming swap space, then fork a child process, and both parent and child processes stay live while doing differen things, I expect a system needs to track how many processes are refering to same swap pages. > No, it does not. > How does FreeBSD keep track of multiple processes refering to same swap pages? > Is it by multiple vm_page objects pointing to same swap device pages with daddr_t? > > I've been looking around swap_pager.h, vm_page, vm_object, struct swblk, and struct swdevt but I don't find reference count for swap device pages. > > Am I missing something? Yes, the mechanism for CoW sharing the same read-only page is called shadowing and it is a form of the content inheritance, where we insert a new default (later swap) object on top of existing object on forking. The sentence above perhaps sounds too cryptic, I recommend you to look at the 'Design and Implementation' book by McKusick and this old article by Dillon https://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/index.html The part about vm objects is still relevant and should answer your question. From owner-freebsd-hackers@freebsd.org Thu Oct 3 08:40:35 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9692212DFD7 for ; Thu, 3 Oct 2019 08:40:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kRKZ4YMDz3KCx for ; Thu, 3 Oct 2019 08:40:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x938eONT097049 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Oct 2019 11:40:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x938eONT097049 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x938eLcN097014; Thu, 3 Oct 2019 11:40:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Oct 2019 11:40:21 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Sebastian Huber , FreeBSD Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <20191003084021.GI44691@kib.kiev.ua> References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191003030837.C2787@besplex.bde.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46kRKZ4YMDz3KCx X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-2.66), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; FREEMAIL_TO(0.00)[optusnet.com.au]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 08:40:35 -0000 On Thu, Oct 03, 2019 at 03:12:26AM +1000, Bruce Evans wrote: > On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > On Thu, Oct 03, 2019 at 02:25:46AM +1000, Bruce Evans wrote: > >> On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > So the conclusion is that the second call can be removed, am I right ? > > Yes. > > All tc_get_timecount() functions should be checked for doing sufficient > initialization in one call (so that deltas for subsequent calls are > correct). This should be it. But, is even a single call to tc_get_timecount() needed for "warmup" ? diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 382d139617d..28d0d738a58 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -3191,7 +3191,6 @@ acpi_resync_clock(struct acpi_softc *sc) * Warm up timecounter again and reset system clock. */ (void)timecounter->tc_get_timecount(timecounter); - (void)timecounter->tc_get_timecount(timecounter); inittodr(time_second + sc->acpi_sleep_delay); } diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c index 34a832089a2..d768397a785 100644 --- a/sys/dev/acpica/acpi_timer.c +++ b/sys/dev/acpica/acpi_timer.c @@ -274,7 +274,6 @@ acpi_timer_resume_handler(struct timecounter *newtc) "restoring timecounter, %s -> %s\n", tc->tc_name, newtc->tc_name); (void)newtc->tc_get_timecount(newtc); - (void)newtc->tc_get_timecount(newtc); timecounter = newtc; } } diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index 98ab5bf3a6b..1e132f4d866 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -303,7 +303,6 @@ xctrl_suspend() * Warm up timecounter again and reset system clock. */ timecounter->tc_get_timecount(timecounter); - timecounter->tc_get_timecount(timecounter); inittodr(time_second); #ifdef EARLY_AP_STARTUP diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 9920a9a9304..847fbbbf35d 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1257,7 +1257,6 @@ tc_init(struct timecounter *tc) tc->tc_frequency < timecounter->tc_frequency) return; (void)tc->tc_get_timecount(tc); - (void)tc->tc_get_timecount(tc); timecounter = tc; } @@ -1519,7 +1518,6 @@ sysctl_kern_timecounter_hardware(SYSCTL_HANDLER_ARGS) /* Warm up new timecounter. */ (void)newtc->tc_get_timecount(newtc); - (void)newtc->tc_get_timecount(newtc); timecounter = newtc; @@ -2011,7 +2009,6 @@ inittimecounter(void *dummy) /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); - (void)timecounter->tc_get_timecount(timecounter); mtx_lock_spin(&tc_setclock_mtx); tc_windup(NULL); mtx_unlock_spin(&tc_setclock_mtx); From owner-freebsd-hackers@freebsd.org Thu Oct 3 15:10:30 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66D1E138960 for ; Thu, 3 Oct 2019 15:10:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46kbzT3md3z4FjM for ; Thu, 3 Oct 2019 15:10:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x832.google.com with SMTP id d16so4047025qtq.8 for ; Thu, 03 Oct 2019 08:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1JzW2++7GTE3s7qUmep7JvHCH58b4SQhkqVQTNfGLhU=; b=SPoHGhLG5fiqHQfp3YiB6qrk/bs2n5w3lux8lbJA/XneZHj2QUwQO7m6NttCXb3gEC 75+cVTFembBPnhWClLSFrwi7/fhontRRBy53qbGbwDxALm3+ho8J2Xtz9+n980BwD8L8 pcDk9u3boE67sRSpsLI6Q97cKCorMkcUfZFNx5NlGYLGDuTHms9314zAAOcWad9rElmE fQUcN8WMDwz4Ys9D9q3tA2zKkIKs6hBcWzhL2jKgmYfxRSfunzjyqFXpbr7O6MPPFzmU etAxA8VACp9RdvOPEE1sWKfi8GeicJ92WKf0xcbt3nXcXZDUhB13AUS4ZXbM7M5irc+Q Mt0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1JzW2++7GTE3s7qUmep7JvHCH58b4SQhkqVQTNfGLhU=; b=h1WZFJL3rV32AlDPYfjG66cxyY3d6eU6NI0uqn4j+ZkcYU9Xr8sJh43HpLdbO2mcEd TB3E3q9aB80BTviasr/nARoDvrs1RGDsP8oUu/BNwZZXwN0CWLJKn26u0+g1MZb7fJ7B t55FlgwtHlDYhyz/BpWH/iCkzLdiuJIr7/ZxT1wPlKzFz9c99fD1PSfODFSi3UO6abFj ElKi0qWrXHfcMz5QDLSxb0tM7oZ5AkBVn+XITywXoKswAGD6Z2KY7vpXeVfyUtpXeHTM IFCuDiWBTdb+t32vM8nXYEH8xXry3J/txvCHF5pgpReXCePckTdaV6QmV7yslvhJuvrd yQ6w== X-Gm-Message-State: APjAAAXsUsTgrz+vEWUwh/C7NFZwgPdvA+AXxxzO9KQZBbcwtckKPQHD +1lfF4GTUrJ82FV/B6/irk6La3tKjXCGTesx6mZWQA== X-Google-Smtp-Source: APXvYqwylLPRPTbyh03Ahl4TfEQlxCLikQDLWcAP9J1ZiXKFKi0hrM1jN7rHnzAc91Syqtpw8Sle7vY3s1ITAlmjPLY= X-Received: by 2002:a0c:9ba8:: with SMTP id o40mr8907647qve.125.1570115427957; Thu, 03 Oct 2019 08:10:27 -0700 (PDT) MIME-Version: 1.0 References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> <20191003084021.GI44691@kib.kiev.ua> In-Reply-To: <20191003084021.GI44691@kib.kiev.ua> From: Warner Losh Date: Thu, 3 Oct 2019 09:10:16 -0600 Message-ID: Subject: Re: Why is tc_get_timecount() called two times in tc_init()? To: Konstantin Belousov Cc: Bruce Evans , Sebastian Huber , FreeBSD X-Rspamd-Queue-Id: 46kbzT3md3z4FjM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=SPoHGhLG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::832) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.82 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.83)[ip: (-9.39), ipnet: 2607:f8b0::/32(-2.57), asn: 15169(-2.16), country: US(-0.05)]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_CC(0.00)[optusnet.com.au] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 15:10:30 -0000 I think this is a good fix. I recall phk saying it was more paranoia for edge cases than really needed in a private email to me, but it's in the 'gap' of email that I lost in a disk crash 12 years ago so I can't find it for sure. Warner On Thu, Oct 3, 2019 at 2:40 AM Konstantin Belousov wrote: > On Thu, Oct 03, 2019 at 03:12:26AM +1000, Bruce Evans wrote: > > On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > > > On Thu, Oct 03, 2019 at 02:25:46AM +1000, Bruce Evans wrote: > > >> On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > So the conclusion is that the second call can be removed, am I right ? > > > > Yes. > > > > All tc_get_timecount() functions should be checked for doing sufficient > > initialization in one call (so that deltas for subsequent calls are > > correct). > > This should be it. > > But, is even a single call to tc_get_timecount() needed for "warmup" ? > > diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c > index 382d139617d..28d0d738a58 100644 > --- a/sys/dev/acpica/acpi.c > +++ b/sys/dev/acpica/acpi.c > @@ -3191,7 +3191,6 @@ acpi_resync_clock(struct acpi_softc *sc) > * Warm up timecounter again and reset system clock. > */ > (void)timecounter->tc_get_timecount(timecounter); > - (void)timecounter->tc_get_timecount(timecounter); > inittodr(time_second + sc->acpi_sleep_delay); > } > > diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c > index 34a832089a2..d768397a785 100644 > --- a/sys/dev/acpica/acpi_timer.c > +++ b/sys/dev/acpica/acpi_timer.c > @@ -274,7 +274,6 @@ acpi_timer_resume_handler(struct timecounter *newtc) > "restoring timecounter, %s -> %s\n", > tc->tc_name, newtc->tc_name); > (void)newtc->tc_get_timecount(newtc); > - (void)newtc->tc_get_timecount(newtc); > timecounter = newtc; > } > } > diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c > index 98ab5bf3a6b..1e132f4d866 100644 > --- a/sys/dev/xen/control/control.c > +++ b/sys/dev/xen/control/control.c > @@ -303,7 +303,6 @@ xctrl_suspend() > * Warm up timecounter again and reset system clock. > */ > timecounter->tc_get_timecount(timecounter); > - timecounter->tc_get_timecount(timecounter); > inittodr(time_second); > > #ifdef EARLY_AP_STARTUP > diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c > index 9920a9a9304..847fbbbf35d 100644 > --- a/sys/kern/kern_tc.c > +++ b/sys/kern/kern_tc.c > @@ -1257,7 +1257,6 @@ tc_init(struct timecounter *tc) > tc->tc_frequency < timecounter->tc_frequency) > return; > (void)tc->tc_get_timecount(tc); > - (void)tc->tc_get_timecount(tc); > timecounter = tc; > } > > @@ -1519,7 +1518,6 @@ sysctl_kern_timecounter_hardware(SYSCTL_HANDLER_ARGS) > > /* Warm up new timecounter. */ > (void)newtc->tc_get_timecount(newtc); > - (void)newtc->tc_get_timecount(newtc); > > timecounter = newtc; > > @@ -2011,7 +2009,6 @@ inittimecounter(void *dummy) > > /* warm up new timecounter (again) and get rolling. */ > (void)timecounter->tc_get_timecount(timecounter); > - (void)timecounter->tc_get_timecount(timecounter); > mtx_lock_spin(&tc_setclock_mtx); > tc_windup(NULL); > mtx_unlock_spin(&tc_setclock_mtx); > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Thu Oct 3 15:24:18 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E227139032 for ; Thu, 3 Oct 2019 15:24:18 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kcHN6rF3z4Gmk for ; Thu, 3 Oct 2019 15:24:16 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id EBF511AF404; Thu, 3 Oct 2019 15:24:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x93FO8QH047836 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Oct 2019 15:24:08 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x93FO6xb047835; Thu, 3 Oct 2019 15:24:06 GMT (envelope-from phk) To: Warner Losh cc: Konstantin Belousov , Sebastian Huber , Bruce Evans , FreeBSD Subject: Re: Why is tc_get_timecount() called two times in tc_init()? In-reply-to: From: "Poul-Henning Kamp" References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> <20191003084021.GI44691@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <47833.1570116246.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Oct 2019 15:24:06 +0000 Message-ID: <47834.1570116246@critter.freebsd.dk> X-Rspamd-Queue-Id: 46kcHN6rF3z4Gmk X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of phk@critter.freebsd.dk designates 130.225.244.222 as permitted sender) smtp.mailfrom=phk@critter.freebsd.dk X-Spamd-Result: default: False [-0.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.78)[-0.782,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-0.97)[-0.972,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; IP_SCORE(0.06)[ip: (0.08), ipnet: 130.225.0.0/16(0.11), asn: 1835(0.14), country: EU(-0.01)]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; FREEMAIL_CC(0.00)[gmail.com] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 15:24:18 -0000 -------- In message , Warner Losh writes: >I think this is a good fix. I recall phk saying it was more paranoia for >edge cases than really needed in a private email to me, but it's in the >'gap' of email that I lost in a disk crash 12 years ago so I can't find i= t >for sure. I think the original reason for this was (locked) delta-based timecounters, (ie counters which roll over rapidly) in order that their first "real" use would not return truly bogus values. -- = 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= . From owner-freebsd-hackers@freebsd.org Thu Oct 3 15:57:38 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 957B9139F5F for ; Thu, 3 Oct 2019 15:57:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kd1s4rtDz4JlB for ; Thu, 3 Oct 2019 15:57:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x93FvLTQ009413 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 3 Oct 2019 18:57:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x93FvLTQ009413 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x93FvLaa009411; Thu, 3 Oct 2019 18:57:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Oct 2019 18:57:21 +0300 From: Konstantin Belousov To: Poul-Henning Kamp Cc: Warner Losh , Sebastian Huber , Bruce Evans , FreeBSD Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <20191003155721.GP44691@kib.kiev.ua> References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> <20191003084021.GI44691@kib.kiev.ua> <47834.1570116246@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47834.1570116246@critter.freebsd.dk> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 46kd1s4rtDz4JlB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_FIVE(0.00)[5]; IP_SCORE_FREEMAIL(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-2.64), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.34), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 15:57:38 -0000 On Thu, Oct 03, 2019 at 03:24:06PM +0000, Poul-Henning Kamp wrote: > -------- > In message > , Warner Losh writes: > > >I think this is a good fix. I recall phk saying it was more paranoia for > >edge cases than really needed in a private email to me, but it's in the > >'gap' of email that I lost in a disk crash 12 years ago so I can't find it > >for sure. > > I think the original reason for this was (locked) delta-based > timecounters, (ie counters which roll over rapidly) in order that > their first "real" use would not return truly bogus values. So do you think it makes sense to keep the doubled call at init ? Or it did not played out and I should commit my patch. From owner-freebsd-hackers@freebsd.org Fri Oct 4 05:38:54 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E8DAFBFBC for ; Fri, 4 Oct 2019 05:38:54 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kzFS4crrz40Pp for ; Fri, 4 Oct 2019 05:38:52 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:Date:Message-Id:Subject:Mime-Version:Content-Type:From; bh=6GuCS68b9ca0laEJdw5nIWsbaH4YzXmqaFCN5J4Xpxc=; b=dIIG/T5WVNWgTTXFnqbXVL67unToHaWuEJiGpIHoA9Qs8xalWlrNs4dRZ4rF+zMMt+FJigloBAT+1NeYwyQ6+PRiJ2pPT97vxqNDjhwna8l50C3cT8zs+C05hhyngcnwamreKgCieR/Xw6Wky1SG1SOlWl6u/RurPZxqJL5fJloD7+FaXj6rwlOUZmDDgNtmQGvLBwz0Koy2FKNg4rB573KNv5z9oUDjFVYoRldrxujFjc3nR36DvOQvQyklk8fU74++ktsgcPZwtKPkULIyCzzd+Dkxnv89aAQJLvmSrT+PK9uXILCqpaRtHn3Agi3j3eMOw6JpBe3KJy1P2GcxHw==; Received: from macmini.bk.cs.huji.ac.il ([132.65.179.19]) by kabab.cs.huji.ac.il with esmtp id 1iGGIj-000IF4-IX for freebsd-hackers@freebsd.org; Fri, 04 Oct 2019 08:38:49 +0300 From: Daniel Braniss Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.18\)) Subject: vsftpd: very strange bug? Message-Id: <0B6ED526-08BD-43EE-A11B-0C948F97A190@cs.huji.ac.il> Date: Fri, 4 Oct 2019 08:38:49 +0300 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3594.4.18) X-Rspamd-Queue-Id: 46kzFS4crrz40Pp X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=dIIG/T5W; dmarc=none; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il X-Spamd-Result: default: False [-0.97 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.947,0]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[huji.ac.il]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.96)[-0.957,0]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; RCVD_IN_DNSWL_NONE(0.00)[210.116.65.132.list.dnswl.org : 127.0.10.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.27)[ipnet: 132.64.0.0/13(-0.77), asn: 378(-0.61), country: IL(0.05)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 05:38:54 -0000 Hi, I=E2=80=99m trying to run vsftpd for anonymous use, and have this very = strange behaviour: on host A it works just fine, but on on any other host it does not. the binary is on a nfs server, the chdir is also to a directory on nfs, = all host run the same root image FreeBSD 11.3. truss from the working host: 55090: chdir("/") =3D 0 (0x0) 55090: chdir("/cs/ftp") =3D 0 (0x0) 55090: chroot(".") =3D 0 (0x0) 55090: setgid(0x6710) =3D 0 (0x0) 55090: setuid(0x2710) =3D 0 (0x0) 55090: setrlimit(RLIMIT_NPROC,{ cur=3D0,max=3D0 }) =3D 0 (0x0) 55090: access("/",W_OK) ERR#13 'Permission = denied=E2=80=99 the access(=E2=80=A6) error is what is expected, but on the failing = hosts access(=E2=80=A6) succeeds! 7254: setgroups(0x2,0x802871000) =3D 0 (0x0) 7254: chdir("/") =3D 0 (0x0) 7254: chdir("/cs/ftp") =3D 0 (0x0) 7254: chroot(".") =3D 0 (0x0) 7254: setgid(0x6710) =3D 0 (0x0) 7254: setuid(0x2710) =3D 0 (0x0) 7254: setrlimit(RLIMIT_NPROC,{ cur=3D0,max=3D0 }) =3D 0 (0x0) 7254: access("/",W_OK) =3D 0 (0x0) any ideas? thanks, danny From owner-freebsd-hackers@freebsd.org Fri Oct 4 10:31:21 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95AF912A8CF for ; Fri, 4 Oct 2019 10:31:21 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail03.adl6.internode.on.net (ipmail03.adl6.internode.on.net [150.101.137.143]) by mx1.freebsd.org (Postfix) with ESMTP id 46l5kw0nFzz4DKb for ; Fri, 4 Oct 2019 10:31:19 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-72-4.adl-apt-pir-bras31.tpg.internode.on.net (HELO midget.dons.net.au) ([14.2.72.4]) by ipmail03.adl6.internode.on.net with ESMTP; 04 Oct 2019 19:56:11 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x94APxNk046819 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 4 Oct 2019 19:56:05 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x94A9C46032674 for ; Fri, 4 Oct 2019 19:39:12 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f X-MIMEDefang-Relay-be813b1f1da6d6b27d681222cb70cc4f5b642383: 14.2.72.4 Received: from [192.168.0.22] (ppp14-2-72-4.adl-apt-pir-bras31.tpg.internode.on.net [14.2.72.4]) by ppp14-2-72-4.adl-apt-pir-bras31.tpg.internode.on.net (envelope-sender ) (MIMEDefang) with ESMTP id x94A90Bn032670; Fri, 04 Oct 2019 19:39:12 +0930 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: vsftpd: very strange bug? From: "O'Connor, Daniel" In-Reply-To: <0B6ED526-08BD-43EE-A11B-0C948F97A190@cs.huji.ac.il> Date: Fri, 4 Oct 2019 19:38:59 +0930 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <0B6ED526-08BD-43EE-A11B-0C948F97A190@cs.huji.ac.il> To: Daniel Braniss X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Score: 1 (*) No, score=1.0 required=5.0 tests=HELO_MISC_IP, KHOP_HELO_FCRDNS, RDNS_DYNAMIC, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 46l5kw0nFzz4DKb X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of darius@dons.net.au has no SPF policy when checking 150.101.137.143) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [6.87 / 15.00]; ARC_NA(0.00)[]; GREYLIST(0.00)[pass,body]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; HAS_XAW(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[dons.net.au]; RCVD_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(1.00)[0.999,0]; R_SPF_NA(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(2.47)[ip: (8.56), ipnet: 150.101.0.0/16(2.51), asn: 4739(1.29), country: AU(0.01)]; RCVD_IN_DNSWL_LOW(-0.10)[143.137.101.150.list.dnswl.org : 127.0.5.1] X-Spam: Yes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 10:31:21 -0000 > On 4 Oct 2019, at 15:08, Daniel Braniss wrote: > I=E2=80=99m trying to run vsftpd for anonymous use, and have this very = strange behaviour: > on host A it works just fine, but on on any other host it does not. > the binary is on a nfs server, the chdir is also to a directory on = nfs, all host run the same root image FreeBSD 11.3. Is maproot different in the exports line for those 2 hosts? -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum From owner-freebsd-hackers@freebsd.org Fri Oct 4 14:05:29 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4E2512F15E for ; Fri, 4 Oct 2019 14:05:29 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46lBV04pgwz4PMh for ; Fri, 4 Oct 2019 14:05:28 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from sslproxy06.your-server.de ([78.46.172.3]) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iGOCw-0007vs-GR; Fri, 04 Oct 2019 16:05:22 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iGOCw-000OUr-Az; Fri, 04 Oct 2019 16:05:22 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 044E42A165B; Fri, 4 Oct 2019 16:05:27 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id mzupG0xfVgJw; Fri, 4 Oct 2019 16:05:26 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 5C81C2A1681; Fri, 4 Oct 2019 16:05:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZbhTbOkREJCu; Fri, 4 Oct 2019 16:05:26 +0200 (CEST) Received: from huber-nb-linux.suse (unknown [192.168.96.161]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 2F7702A165B; Fri, 4 Oct 2019 16:05:26 +0200 (CEST) Subject: Re: Why is tc_get_timecount() called two times in tc_init()? To: Poul-Henning Kamp , Warner Losh Cc: Konstantin Belousov , Bruce Evans , FreeBSD References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> <20191003084021.GI44691@kib.kiev.ua> <47834.1570116246@critter.freebsd.dk> From: Sebastian Huber Message-ID: <141ee0af-2ff4-50fc-b4e4-6d1fc47e04f3@embedded-brains.de> Date: Fri, 4 Oct 2019 16:05:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <47834.1570116246@critter.freebsd.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.101.4/25592/Fri Oct 4 10:30:20 2019) X-Rspamd-Queue-Id: 46lBV04pgwz4PMh X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sebastian.huber@embedded-brains.de designates 85.10.215.148 as permitted sender) smtp.mailfrom=sebastian.huber@embedded-brains.de X-Spamd-Result: default: False [-2.70 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_SEVEN(0.00)[8]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:85.10.215.148]; IP_SCORE(-1.40)[ip: (-6.26), ipnet: 85.10.192.0/18(1.07), asn: 24940(-1.80), country: DE(-0.01)]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[embedded-brains.de]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[148.215.10.85.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:24940, ipnet:85.10.192.0/18, country:DE]; FREEMAIL_CC(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; HAS_X_AS(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 14:05:29 -0000 On 03/10/2019 17:24, Poul-Henning Kamp wrote: > -------- > In message > , Warner Losh writes: >=20 >> I think this is a good fix. I recall phk saying it was more paranoia f= or >> edge cases than really needed in a private email to me, but it's in th= e >> 'gap' of email that I lost in a disk crash 12 years ago so I can't fin= d it >> for sure. >=20 > I think the original reason for this was (locked) delta-based > timecounters, (ie counters which roll over rapidly) in order that > their first "real" use would not return truly bogus values. Ok, this explanation makes sense. When I ported the FreeBSD timecounter=20 implementation to RTEMS I was a bit surprised how many chips (even a=20 Cortex-M has nothing out of the box) lack a simple free running counter.=20 Maybe it should be added as a comment to these two tc_get_timecount() cal= ls? --=20 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=C3=A4ftliche Mitteilung im Sinne des EHUG= . From owner-freebsd-hackers@freebsd.org Fri Oct 4 14:10:54 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46DA512F858 for ; Fri, 4 Oct 2019 14:10:54 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46lBcD6N31z4Q1v for ; Fri, 4 Oct 2019 14:10:52 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 14B4A1AF403; Fri, 4 Oct 2019 14:10:50 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x94EAn3I060169 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 4 Oct 2019 14:10:49 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x94EAmRs060168; Fri, 4 Oct 2019 14:10:48 GMT (envelope-from phk) To: Sebastian Huber cc: Warner Losh , Konstantin Belousov , Bruce Evans , FreeBSD Subject: Re: Why is tc_get_timecount() called two times in tc_init()? In-reply-to: <141ee0af-2ff4-50fc-b4e4-6d1fc47e04f3@embedded-brains.de> From: "Poul-Henning Kamp" References: <0e27fb3e-0f60-68e1-dbba-f17c3d91c332@embedded-brains.de> <20191002140040.GA44691@kib.kiev.ua> <20191003013314.O2151@besplex.bde.org> <20191002163946.GE44691@kib.kiev.ua> <20191003030837.C2787@besplex.bde.org> <20191003084021.GI44691@kib.kiev.ua> <47834.1570116246@critter.freebsd.dk> <141ee0af-2ff4-50fc-b4e4-6d1fc47e04f3@embedded-brains.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <60166.1570198248.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Oct 2019 14:10:48 +0000 Message-ID: <60167.1570198248@critter.freebsd.dk> X-Rspamd-Queue-Id: 46lBcD6N31z4Q1v X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of phk@critter.freebsd.dk designates 130.225.244.222 as permitted sender) smtp.mailfrom=phk@critter.freebsd.dk X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.21)[-0.211,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-0.95)[-0.949,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; IP_SCORE(0.07)[ip: (0.08), ipnet: 130.225.0.0/16(0.11), asn: 1835(0.15), country: EU(-0.01)]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 14:10:54 -0000 -------- In message <141ee0af-2ff4-50fc-b4e4-6d1fc47e04f3@embedded-brains.de>, Seba= stian Huber writes: >> I think the original reason for this was (locked) delta-based >> timecounters, (ie counters which roll over rapidly) in order that >> their first "real" use would not return truly bogus values. > >Ok, this explanation makes sense. When I ported the FreeBSD timecounter = >implementation to RTEMS I was a bit surprised how many chips (even a = >Cortex-M has nothing out of the box) lack a simple free running counter. = >Maybe it should be added as a comment to these two tc_get_timecount() cal= ls? As long as the counter can be read atomically and does not roll over in a matter of milliseconds, two reads are not necessary. -- = 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= . From owner-freebsd-hackers@freebsd.org Fri Oct 4 14:14:10 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2D5B12FC4E for ; Fri, 4 Oct 2019 14:14:10 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46lBh13hwlz4QVg for ; Fri, 4 Oct 2019 14:14:09 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5AC3821D28 for ; Fri, 4 Oct 2019 10:14:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 04 Oct 2019 10:14:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zyxst.net; h= date:from:to:subject:message-id:mime-version:content-type; s= fm3; bh=OmY4cEquSgV7ghAo/mjL4Ln7+8EwZC/RQw2D2tohjqk=; b=rV2CAGlA Kj5j+y+suEo/LJxLrNBa0EDsZI2PVUf+uq7ln4SFEG0nWVgUDxpCmBU3wk5O4yU7 HI7fPrJRvTp6yUhbiqCJOMuxi7T1mlj5KlhPur5WNlH8ECqVXcNLul9lNikSddUh 2dbPt/0E+1IzdTdgYn16a6UC8JEt/zYxhHfN3001NO2A2o9HrfZOzhRNSOtIXeVq CP4JyNChL9iVIy++Vcf1u4JmCEWgcT6ziu33Sz2FKbFysKLyyEXA6ccaqNu8wOS7 xwJ7aZLq8pRSiLx7TBhVZpymmsK7lrAUHpMF/3XKKMG+tip/y3BU4lxYkC0cbNa1 9cIE8rR5ZTSCyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=OmY4cEquSgV7ghAo/mjL4Ln7+8EwZ C/RQw2D2tohjqk=; b=J5C7ZsRkii12ehQFEHxwTBNE2lm/Sb+m+X5Kneqh3YWgm 1RWgEhnQleeihDGeOvTts4NnG4Fs1s00XuQXc77vgx3GJjoKfwcunAD2QKB5woU0 4Alp5EsMroQyAJDA4URLwZbg/NE8jLU2yKvQ1gTZmhFI2KgkeR2Qg5fV4qLtz9MD gd6Ul0Y0p4XNEfa2KQkf0C7VzZfxfmsnDjaegqYoAsfvV8tUemF7MIK63U5FC5+w b5o52WdFelcSzD+5Q/4uAlhXYod1eFketjD11MwVLHiKMKcN5hXrIj/cP6PAGX8x 6hZqG/m05ATXos56D+sqQdaI2BuUfuT7ZvCJIxGjA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrhedugdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggufgesghdtreertd ervdenucfhrhhomhepthgvtghhqdhlihhsthhsuceothgvtghhqdhlihhsthhsseiihiig shhtrdhnvghtqeenucffohhmrghinheplhhlvhhmrdhorhhgnecukfhppeekvddrjedtrd eluddrleelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehtvggthhdqlhhishhtshesiiih gihsthdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from bastion.zyxst.net (bastion.zyxst.net [82.70.91.99]) by mail.messagingengine.com (Postfix) with ESMTPA id B82BDD60063 for ; Fri, 4 Oct 2019 10:14:07 -0400 (EDT) Date: Fri, 4 Oct 2019 15:13:38 +0100 From: tech-lists To: freebsd-hackers@freebsd.org Subject: CPUTYPE?= in make.conf Message-ID: <20191004141338.GA72749@bastion.zyxst.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 46lBh13hwlz4QVg X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zyxst.net header.s=fm3 header.b=rV2CAGlA; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=J5C7ZsRk; dmarc=none; spf=pass (mx1.freebsd.org: domain of tech-lists@zyxst.net designates 66.111.4.28 as permitted sender) smtp.mailfrom=tech-lists@zyxst.net X-Spamd-Result: default: False [-8.18 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[zyxst.net:s=fm3,messagingengine.com:s=fm3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[zyxst.net]; DKIM_TRACE(0.00)[zyxst.net:+,messagingengine.com:+]; IP_SCORE(-3.48)[ip: (-9.83), ipnet: 66.111.4.0/24(-4.86), asn: 11403(-2.68), country: US(-0.05)]; SIGNED_PGP(-2.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[28.4.111.66.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 14:14:10 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I hope this is the right place to ask about this; if not please suggest whe= re? I have a large poudriere system running 12.1-STABLE #0 r352869. It compiles ports in poudriere jails for many other smaller systems, some on same arch (amd64) but different cpu types. The host cputype is: # llvm-tblgen --version LLVM (http://llvm.org/): LLVM version 8.0.1 Optimized build. Default target: x86_64-unknown-freebsd12.1 Host CPU: sandybridge The actual cpu is Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz (x2) If I make a make.conf for a poudriere jail and define CPUTYPE?=3Dbtver1, se= veral ports fail to compile, like python36 and lzo2. If I do the same and define it as CPUTYPE?=3Dhaswell, *everything* fails ap= art =66rom building the jail itself. If I do the same thing on a different host, where the host cpu is: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz no failures happen. llvm-tblgen here reports haswell. The freebsd version is the same. What I'm asking is, is this a hardware failure on the failing system? Or is= it a capabilities issue, in that the one having the problem hasn't got the rig= ht instruction set? The Xenon differs from the i7 in that it doesn't have these cpu instructions available: AVX AVX2 BMI1 BMI2 F16C FMA3=20 Supervisor Mode Execution Protection Advanced Bit manipulation Enhanced REP MOVSB/STOSB INVPCID MOVBE RD/WR FSGSBASE instructions RDRAND I'm hoping for a performance boost if ports are compiled to the specific cputype of the target machine. if I don't specify cputype at all on the failing system, the ports will compile. Is it an instruction set issue or is the Xenon actually failing in some way? thanks, --=20 J. --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAl2XU6EACgkQs8o7QhFz NAVAiQ//XlNxcqiyDOGak+MyRjdU1b1UNO7M7T/EwV449kJvxUNEdzz5X2yXLzGk jO8vxKUUgziVSyHAmAWD4hwifLmq2DlvUTUwds4nYKPUfSCIsv/cig12TUNjdPzQ LhXPaeblcLk3frS5sIsDr963ytm+u0AEBeAgi6M+wf750gDTVhA5hoO3x3WiARk0 tJKbAB9jmh4NPG7cL9dKDYn5eZhul6A99Q0EGkq3HQrM7uLNEAAd2WcT1G1d2nzk GH4qdfz8d+hyZsUwuDegJ08jF/JL8fXfIDTPZzPtSiWc1Rx61nFX/ntaVUHMhk8F Q4lFm1yjm53+GTTpbV7stH+iwuHl3SZNNM74vsTSGEHBivIJuxxR8HFXZncyYMZo N6u/VBHWtbf+qgH16DLWo38dMbnz/fS+W1kkENDSuVMT8sZUuiiLPNjL/Q15OF7k xJ6IJjRBKve9WGcWTNK436kRBV5+sN7G8M1mP/E3WzjeMtxfUjssnhbfzeVjpUGj 8qJ0Kz/HnWgAEwzSfLd1DnpTLESMy8W41ILha9PecxA8Y11sb2DvjKaCumzPjvN3 8zTj5nrPBNoD2Ed/NK4xkyMR9W1q3Q/dCgyn7ec1MFTMmDxNwSToBNazcyQGjsQU kO+7PLgGflDhbgw6vku/bSFV1b+2ZLPAKFZS2oYyaCznRT/z20E= =BAiD -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- From owner-freebsd-hackers@freebsd.org Fri Oct 4 15:14:59 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1635130DA9 for ; Fri, 4 Oct 2019 15:14:59 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lD2B4sNJz4St5 for ; Fri, 4 Oct 2019 15:14:58 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: by mail-io1-xd2b.google.com with SMTP id b19so14343432iob.4 for ; Fri, 04 Oct 2019 08:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=q9S+7LGsWWmmgbKIPW0Y3zv/8hvCYcdpxrYcg1S6W9Q=; b=UQMps+/mLsCHWDGnv/GuikhAxAvxQ18aNFh4FT+Vv2kxdiQ6TpuQHHVCIGPJawTBA4 0hmw9dAMJRCA1dv2wrGQ5u/FaGdsMDi5ZlHT3nah38Qdtc4Yf9STVhPi0LmF17bWNDS1 JllYDGFtf46RDzElVy34GRrJwow4h13OKnHJkA4LJ4e9X/TOtYLyg/FNHnBZz2gt599e mCV0NhqV38QkU4UmRDvUqg+NaXIOwyf80TnPtjSMS9wwhA+XWDXYqVI6rCmTrcszqEp1 skORziNCfWBDBYMGcvA36q3XrBwhd+sfvnxJX38K/zdvXTRDnO/jWoYd62RdNTnJ4log WHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=q9S+7LGsWWmmgbKIPW0Y3zv/8hvCYcdpxrYcg1S6W9Q=; b=f55rOFyMv4RopeKEVlJheN1q0ItIYBuhjFc2xbQhfeBsEYs0ocYrHXAL+ArXyRZ8MU o9onBVTLl5ZnItm7pfScT5m2LaRPXJ2EMHsdCJvE8kme0oKc7XMNngHsE3H0O3u00XVy 4iWwbhy5xEcr1uvXPCfPlyqQbZROrqXqnW7jA/OlNk3zhSP9mKIG6aGI4VIZcM0VOTob waukV8HMw9Fzc8Z6Ajl0wzSLclce9PTarVWJt7cUNbY6ys9sJn0oojAmxY3H2J4KrkPH JJ/Mesn6nRfgEQJzlITy+6eRcPGE2s86AhiP6C3gacN2cEzR6b/6zA0S54JwlelXQIHG 2inA== X-Gm-Message-State: APjAAAXGinJPFLXpUBhYjsMIEKCXpJ41Bfu3ZhM4ZQp44cSORQyiyUz1 zAeaN6CZ6sYqDtofm01p/yfwAu5E8ENLt6Aa5XwFRcUG X-Google-Smtp-Source: APXvYqz4c27rs5PA8Ut5FEUzrPNgx0OhupRXcXj2CH16zeY2EPADBUoH065Fx0hW0zhbZwJ+ElAYfylBLthZLB/DzFs= X-Received: by 2002:a5d:80cc:: with SMTP id h12mr13147659ior.151.1570202095950; Fri, 04 Oct 2019 08:14:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:9f01:0:0:0:0:0 with HTTP; Fri, 4 Oct 2019 08:14:55 -0700 (PDT) In-Reply-To: <20191004141338.GA72749@bastion.zyxst.net> References: <20191004141338.GA72749@bastion.zyxst.net> From: grarpamp Date: Fri, 4 Oct 2019 11:14:55 -0400 Message-ID: Subject: Re: CPUTYPE?= in make.conf To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46lD2B4sNJz4St5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=UQMps+/m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of grarpamp@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=grarpamp@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(0.00)[ip: (-5.34), ipnet: 2607:f8b0::/32(-2.56), asn: 15169(-2.16), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; SUBJECT_HAS_QUESTION(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 15:14:59 -0000 On 10/4/19, tech-lists wrote: > The Xenon differs from the i7 in that it doesn't have these cpu > instructions available: > > AVX Intel.com says AVX extensions should be present in both. Does intel.com even publish per cpu or per family exhaustive lists of all the instructions present? ie: So users don't have to collate all the base instruction plus extension set terminology docs separately. From owner-freebsd-hackers@freebsd.org Fri Oct 4 17:11:09 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A55D133559; Fri, 4 Oct 2019 17:11:09 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lGcD4KR4z4ZXK; Fri, 4 Oct 2019 17:11:08 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: by mail-qt1-x830.google.com with SMTP id c21so9464795qtj.12; Fri, 04 Oct 2019 10:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=luVViQahG/PmQMwMu8qRx/BD4SjbdNDvP13lh2ySFdQ=; b=fHdE0dzK+dXvIVlA02gsdTC8+4/23/rb8pEptm9sRgh78hJYg4OsVLxucpJkYHodMR 0hLHU+brfki9BiEJMSVPDlivSsTdXIKfESAILBbW55vsz+6XrqgLgMvMfSjKHymB2UL2 7lCeX7URlQp1RDeZyk0Vx/6yUqPS3iLkqxTZhyQngZjrds4Y3zvrV9qeg405SeqJBEDY YZ0SDZjQ3o464fMg3ogwv0mDHtRD0/dR9WOLAfi3/vWkzZjia0OhDA6zbtyuLFZbk0yj ryam8U6fyXDhSf64SZVZ7f/qRLCk7/GjUoPIF86Z6EfZaPsfSgOsiTaabeUUkBcmk2Hk zPLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=luVViQahG/PmQMwMu8qRx/BD4SjbdNDvP13lh2ySFdQ=; b=c1JHQCiU9ZYKZEnKOy2PlBFPq9o2ZKuLJrG4Ef/rk/lMQcKL6h2ttlhMWYPdFuOqvG DjtYxUsp1Hd+ZIjdUqhIhDwhCPser+cPgbzFljzEIRjQRIIXvFx4DOv1x0hFi+evm80M kWIBCZZrXm3cHEdysIJ8SKDI8Z917wW79lHn9VWDASNbaE0XZW9fZqWlrO2zwtOuGbHU 77p+oPRqCsVmRx4hiaYmhH9oowsvjVFJJrHgX7YnwhoD7PhXsmCgMXiD4f3Ly0RmUGg9 xCqcK+ffJ71ZtRg2OpdsedaSZuVJfbL057jV5Dj1W0pflo8v5JtN1pMveI1vxLE1dNli BnzA== X-Gm-Message-State: APjAAAX+Edcd5CJEgEnqhTOnLTLcMfsKcXzQO9JztlZdNkTOsoHIPUHo VU44mssC8wWMnLNBAyuSt7Vp3KAp X-Google-Smtp-Source: APXvYqw/2/8PO9uzb/LHP6Hsu47LsHPbQzi9dwocbnIQs9qnZoppyxxxrZN0x7HABI3jGLBMPLgqaA== X-Received: by 2002:ac8:7346:: with SMTP id q6mr16902388qtp.323.1570209066944; Fri, 04 Oct 2019 10:11:06 -0700 (PDT) Received: from ?IPv6:2804:388:e060:817e:40da:6f71:7d9a:55fa? ([2804:388:e060:817e:40da:6f71:7d9a:55fa]) by smtp.gmail.com with ESMTPSA id c12sm3413519qkc.81.2019.10.04.10.11.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Oct 2019 10:11:05 -0700 (PDT) From: =?utf-8?Q?Lucas_Nali_de_Magalh=C3=A3es?= Mime-Version: 1.0 (1.0) Subject: Re: Git/Mtn for FreeBSD, PGP WoT Sigs, Merkel Hash Tree Based Date: Fri, 4 Oct 2019 14:11:03 -0300 Message-Id: <252308D7-D927-4770-92B4-9CD4E6EF13DB@gmail.com> References: Cc: freebsd-security@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org In-Reply-To: To: grarpamp X-Mailer: iPhone Mail (17A861) X-Rspamd-Queue-Id: 46lGcD4KR4z4ZXK X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=fHdE0dzK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rollingbits@gmail.com designates 2607:f8b0:4864:20::830 as permitted sender) smtp.mailfrom=rollingbits@gmail.com X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.33), ipnet: 2607:f8b0::/32(-2.56), asn: 15169(-2.16), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 17:11:09 -0000 > On Sep 20, 2019, at 6:04 PM, grarpamp wrote: >=20 > =EF=BB=BF[broken links fixed] >=20 > For consideration... >=20 > SVN really may not offer much in the way of native > internal self authenticating repo to cryptographic levels > of security against bitrot, transit corruption and repo ops, > external physical editing, have much signing options, etc. > Similar to blockchain and ZFS hash merkle-ization, > signing the repo init and later points tags commits, > along with full verification toolset, is useful function. [...] > Note also CVS, which some BSD's still use (ahem: Open, Net), > is even worse than SVN with zero protection > at all in any component regarding this subject. >=20 > It really time to migrate repo tech to year 2020. Are you sure you are talking about plain text files?May I suggest get rid of= the binary only part instead? I imagine how painful it is to do a 'git chec= kout' of many GiB of data. TeXLive is worth a few and is an eternity here. Lc --=20 rollingbits =E2=80=94 =F0=9F=93=A7 rollingbits@gmail.com =F0=9F=93=A7 rollin= gbits@terra.com.br =F0=9F=93=A7 rollingbits@yahoo.com =F0=9F=93=A7 rollingbi= ts@globo.com =F0=9F=93=A7 rollingbits@icloud.com From owner-freebsd-hackers@freebsd.org Fri Oct 4 17:17:04 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9CAC133B19 for ; Fri, 4 Oct 2019 17:17:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lGl45vStz4b59; Fri, 4 Oct 2019 17:17:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 670EB1CB5; Fri, 4 Oct 2019 17:17:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::1580:4763:8263:d913] (unknown [IPv6:2001:470:7a58:0:1580:4763:8263:d913]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 74CE04BF71; Fri, 4 Oct 2019 19:17:02 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_334A27A3-D319-42A6-AFC6-7DC1E277F703"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: CPUTYPE?= in make.conf Date: Fri, 4 Oct 2019 19:16:53 +0200 In-Reply-To: <20191004141338.GA72749@bastion.zyxst.net> Cc: freebsd-hackers@freebsd.org To: tech-lists References: <20191004141338.GA72749@bastion.zyxst.net> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 17:17:05 -0000 --Apple-Mail=_334A27A3-D319-42A6-AFC6-7DC1E277F703 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 4 Oct 2019, at 16:13, tech-lists wrote: >=20 > I hope this is the right place to ask about this; if not please = suggest where? >=20 > I have a large poudriere system running 12.1-STABLE #0 r352869. It = compiles > ports in poudriere jails for many other smaller systems, some on same = arch > (amd64) but different cpu types. >=20 > The host cputype is: >=20 > # llvm-tblgen --version > LLVM (http://llvm.org/): > LLVM version 8.0.1 > Optimized build. > Default target: x86_64-unknown-freebsd12.1 > Host CPU: sandybridge >=20 > The actual cpu is Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz (x2) >=20 > If I make a make.conf for a poudriere jail and define CPUTYPE?=3Dbtver1,= several > ports fail to compile, like python36 and lzo2. >=20 > If I do the same and define it as CPUTYPE?=3Dhaswell, *everything* = fails apart > from building the jail itself. This will never work. Your host Sandybridge CPU is of an earlier generation (2nd) than the target, which is Haswell. Targeting Haswell, the compiler will generate instructions that the host CPU does not support, which in turn will lead to SIGILL signals as soon as such instructions are encountered. Similarly, btver1 is an AMD CPU (family 14h), which is likely to differ from your host CPU in which instructions it supports. I guess you were just lucky that any programs ran at all... :) > If I do the same thing on a different host, where the host cpu is: = Intel(R) > Core(TM) i7-4770K CPU @ 3.50GHz >=20 > no failures happen. llvm-tblgen here reports haswell. The freebsd = version is > the same. Yes, i7-4770K is of the Haswell generation, so that is expected to work. > What I'm asking is, is this a hardware failure on the failing system? = Or is it > a capabilities issue, in that the one having the problem hasn't got = the right > instruction set? This is not a hardware failure, but totally expected behavior. You can only run poudriere builds for CPUs of an equal, or earlier generation, and even then you will have to ensure that the target CPU does not accidentally support instructions from your host CPU. > I'm hoping for a performance boost if ports are compiled to the = specific > cputype of the target machine. It will depend greatly on the type of program. Some can see minor or even large performance gains, for example if it is possible to vectorize many loops in the program. But for many programs, you will likely find little to no differences. -Dimitry --Apple-Mail=_334A27A3-D319-42A6-AFC6-7DC1E277F703 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXZd+hQAKCRCwXqMKLiCW o5osAKCncxoQPmvOiTlEk/ugoUqL2/cnJgCfXw6S/sg8V45JTlCu02fThV/qK4g= =vimx -----END PGP SIGNATURE----- --Apple-Mail=_334A27A3-D319-42A6-AFC6-7DC1E277F703-- From owner-freebsd-hackers@freebsd.org Fri Oct 4 17:22:53 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7DD3133F33; Fri, 4 Oct 2019 17:22:53 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46lGsm6nWxz4bcn; Fri, 4 Oct 2019 17:22:52 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by mail-oi1-f196.google.com with SMTP id m16so6427466oic.5; Fri, 04 Oct 2019 10:22:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=41wyONT/jCdqrWpuHx9S2fZxmUxyz8x4I6gNx8g+wDY=; b=QfBonVy4g/NBdC/cabH+29DxmW65GmPbYT4Hd93kAKZJLNGSxfceglOq8+WWiD95jL lGx1SfYJ6QLUPaqj7A+hqyV4AfD2GOkLqu2xdW7BaDqv2ubLIlyOvqvbei29CXP9Ha3I r/hXvuwgaWn4IHoTLHHXdHKCBk7oly0SP0tMceQEEb9X1txzRNGgrVWN/2rh4uVaQIZ+ OV2LPs9KMcPGTBposm67tTSzHd/gFabuKfmJOeYmdKPFwXH0MnyzpBsKDu3fFHk4DuND BvNKh4pA6zEkjOWIs3MU6qBh5+8hd5j/Hljr2bJp1VedECHgCtPMl+FjAC8lDl5hmXUi s40Q== X-Gm-Message-State: APjAAAU2zlk2oEbVg+BN9hp01HEzOI8OC1L015xhL6QCMLToSlA9Tv/B zWVNpCieK2fGgUr1LjYfnkgBhzbFodE/exvVTw0= X-Google-Smtp-Source: APXvYqxvmFiP1WFGsjumxxVTM8b2C+Xrs/aEMpKFzP+ffmovWHhci+pq4iFK8R/58EWaCUfPyAL7a4PQSv237JoKkoY= X-Received: by 2002:aca:304b:: with SMTP id w72mr7731009oiw.126.1570209771415; Fri, 04 Oct 2019 10:22:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Igor Mozolevsky Date: Fri, 4 Oct 2019 18:22:15 +0100 Message-ID: Subject: Re: Git/Mtn for FreeBSD, PGP WoT Sigs, Merkel Hash Tree Based To: grarpamp Cc: freebsd security , Hackers freeBSD , freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46lGsm6nWxz4bcn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mozolevsky@gmail.com designates 209.85.167.196 as permitted sender) smtp.mailfrom=mozolevsky@gmail.com X-Spamd-Result: default: False [-3.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[hybrid-lab.co.uk]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[196.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.09)[ipnet: 209.85.128.0/17(-3.27), asn: 15169(-2.16), country: US(-0.05)]; FORGED_SENDER(0.30)[igor@hybrid-lab.co.uk,mozolevsky@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[196.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[igor@hybrid-lab.co.uk,mozolevsky@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 17:22:53 -0000 On Fri, 20 Sep 2019 at 22:01, grarpamp wrote: > > For consideration... > > SVN really may not offer much in the way of native > internal self authenticating repo to cryptographic levels > of security against bitrot, transit corruption and repo ops, > external physical editing, have much signing options, etc. > Similar to blockchain and ZFS hash merkle-ization, > signing the repo init and later points tags commits, > along with full verification toolset, is useful function. Isn't UNIX(TM) philosophy that a program should do one thing and do it well? Just because people can't be bothered to learn to use multiple tools to do *multiple* tasks on the same dataset, is not a reason, let alone "the reason," to increase any program complexity to orders of N^M^K^L so that one "foo checkout" does all the things one wants! Incidentally, how does that saying go, if you think "crypto" is the solution to your problem, then ... (I'm slightly paraphrasing, of course). When crypto invalidates a repo, how would it be different from seeing non ASCII characters in plain ASCII files, or sudden refusal to compile---one way or another you'd still need to restore from BACKUP, hence crypto IS NOT a substitute for good data keeping practices. Also, what empirical data do you have for repo bitrot/transit corruption that is NOT caught by underlying media? -- Igor M. From owner-freebsd-hackers@freebsd.org Sat Oct 5 14:20:03 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FDA8134413 for ; Sat, 5 Oct 2019 14:20:03 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46lpmL2fKZz3HQp for ; Sat, 5 Oct 2019 14:20:01 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5DF1221EAD for ; Sat, 5 Oct 2019 10:20:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 05 Oct 2019 10:20:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zyxst.net; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=k/6HCuXW9f08XcczkNf0KQej+Ax kA6VUChw6PGVQzgQ=; b=aIcJ2ReKqEA+MO9byUFuZL6/gAVM1LKTbykPTNcnWnU lza6bbd9Q6KKfQ1z9aCAVwjcc8+AY15Wsh+Zrs0f5NFSyMkeotKe80VLnLdVgP+s hixBHr6Y5MkKsaD9/qMS3dKc/r3uQ2Dk103hbFKMNwN+mGe3atzDKzkJyRv4zjVf 6iPWFjnrCkHzqOmAeK4oKljLFJr18wwuifT8QSN/wD8bJEZiIAjWuopMsZPXZxcP pVX5uHgjD3VZQ8G2D8EUUkCO944XmJyJlWSyqUhUEnDLDTmh2VK8xhG7YvgPyMO4 MCJu31lvrvSY1EjiRUwq6jY7ZBkmoNfQLdr4hO9tdCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=k/6HCu XW9f08XcczkNf0KQej+AxkA6VUChw6PGVQzgQ=; b=h74LXIwGGyxepRlk3na7/2 bm+U/YwcGBoBtUll2dYTeWUIhWPPHHZMDEBOXOAIS3wBLY4YQC+UZcpZ1fm3mBt8 VhEVkKy7Nc236ohTKwq7b7xhL6o7K0UrNyiw/LK1dTfm6kbxd2glJJ5sj1f6cNXW BMKtxsRSRNkI89AISNSgvXVUQBAz/xDVvzLn/q92jSVWz+je6WSwGwgkUlfiE8U0 8ptxOrwWQTifu22CYSj7nG1yQqgGggf78bI3hk9N07jPL5pnVUPDemtI1Zr4dnkC up0blLV0qY5EaNQBhrlipfLTzCQKpzEAitay92PHAxiEpYdIqj2BuJ6EfuD5tCqw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrheefgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjfgesghdtre ertdervdenucfhrhhomhepthgvtghhqdhlihhsthhsuceothgvtghhqdhlihhsthhsseii hiigshhtrdhnvghtqeenucfkphepkedvrdejtddrledurdelleenucfrrghrrghmpehmrg hilhhfrhhomhepthgvtghhqdhlihhsthhsseiihiigshhtrdhnvghtnecuvehluhhsthgv rhfuihiivgeptd X-ME-Proxy: Received: from bastion.zyxst.net (bastion.zyxst.net [82.70.91.99]) by mail.messagingengine.com (Postfix) with ESMTPA id 94CDE8005C for ; Sat, 5 Oct 2019 10:20:00 -0400 (EDT) Date: Sat, 5 Oct 2019 15:19:31 +0100 From: tech-lists To: freebsd-hackers@freebsd.org Subject: Re: CPUTYPE?= in make.conf Message-ID: <20191005141931.GA38969@bastion.zyxst.net> References: <20191004141338.GA72749@bastion.zyxst.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 46lpmL2fKZz3HQp X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zyxst.net header.s=fm3 header.b=aIcJ2ReK; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=h74LXIwG; dmarc=none; spf=pass (mx1.freebsd.org: domain of tech-lists@zyxst.net designates 66.111.4.27 as permitted sender) smtp.mailfrom=tech-lists@zyxst.net X-Spamd-Result: default: False [-8.18 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[zyxst.net:s=fm3,messagingengine.com:s=fm3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.27]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[zyxst.net]; DKIM_TRACE(0.00)[zyxst.net:+,messagingengine.com:+]; IP_SCORE(-3.48)[ip: (-9.82), ipnet: 66.111.4.0/24(-4.86), asn: 11403(-2.68), country: US(-0.05)]; SIGNED_PGP(-2.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.4.111.66.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2019 14:20:03 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Dimitry, On Fri, Oct 04, 2019 at 07:16:26PM +0200, Dimitry Andric wrote: >This will never work. Your host Sandybridge CPU is of an earlier >generation (2nd) than the target, which is Haswell. > >Targeting Haswell, the compiler will generate instructions that the host >CPU does not support, which in turn will lead to SIGILL signals as soon >as such instructions are encountered. > >Similarly, btver1 is an AMD CPU (family 14h), which is likely to differ >from your host CPU in which instructions it supports. I guess you were >just lucky that any programs ran at all... :) ok, I can understand that, but >This is not a hardware failure, but totally expected behavior. You can >only run poudriere builds for CPUs of an equal, or earlier generation, >and even then you will have to ensure that the target CPU does not >accidentally support instructions from your host CPU. If I make a poudriere jail on the sandybridge host cpu (bought in 2013) wit= h atom n450 cpu (CPUTYPE?=3Dbonnell specified in the jail's make.conf,=20 target machine bought in 2010), nothing will build - when pkg tries to buil= d, get "illegal instruction" at the pkg phase. I am going to try the same thing with the haswell host.=20 thanks, --=20 J. --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAl2YpoYACgkQs8o7QhFz NAVTmA//QxMudz83rm0RGjp1h4zSPW5TF/IqiIm2o4x+LN2Eza+F+rk0qXynlxYC FOXx+JYNSZGn66Spkj9APNiWf/e47m/+a/1lJLVU8nPLeVZucNEPSQaGCOXaexje zYh9Pwy1fFnM8cZe7UxaMbpke8+KIlEgyiObb4yerNwHroe3umKIkw9AWDNXrcdt 0r0lT6rPegzOzLZheOxIV+ZaeAHSrz05XO1TQT2Vjpeca/5ufG/SRSG9CvWCgOAU H4ZKWmv/yYDnrg8gB3m25f871EfXBkwr/df6f9xyvynsRWoEzDbkE1DvTdX6z+i2 8b1xD9uX9kCAPHjoW9sQ9Rt2ZRVe2VWKrYY2ae7RwllfWcdN0QeEJ8c4D4q4ZcUj tovQQEYj8q4yC4JT0y5Hw4ip9vmWgGLc66TH7umvdYzJKjDMkBtTZLgGHj2HoZPI 4o2JgaH7KohK48MU/S60j1igVf5sofhJEH9ZRAOQ3d4H2qfzglx3qt03bcNtZnYp wJy2o5JQIpRtDir9JgpAb25I/wPaLumKk4g0yRTKheWUcEI88L8igw39VshvZ1GT iN4QVuGPh6WsXArqo7m/411ljYy5u41KI1cOgQUCdQO4ZJLUmf2NcKkGv93AWiFd l9N2KmnJ6ztaGXtn59fFBlJa9EmSlwinHOIav0WDxBd1BK2tpbg= =eDx2 -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--