Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9E062200C60 for ; Mon, 24 Apr 2017 09:40:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9C902160BA5; Mon, 24 Apr 2017 07:40:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E504F160B99 for ; Mon, 24 Apr 2017 09:40:52 +0200 (CEST) Received: (qmail 52755 invoked by uid 500); 24 Apr 2017 07:40:52 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 52744 invoked by uid 99); 24 Apr 2017 07:40:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2017 07:40:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5B1671A05D4 for ; Mon, 24 Apr 2017 07:40:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.321 X-Spam-Level: X-Spam-Status: No, score=-2.321 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XGwgjgxoYY-Q for ; Mon, 24 Apr 2017 07:40:49 +0000 (UTC) Received: from mail0.iggroup.com (mail0.iggroup.com [195.234.39.199]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 131B35FB7A for ; Mon, 24 Apr 2017 07:40:48 +0000 (UTC) Received: from ukvmprdvon601.igi.ig.local (HELO LMPRDEXC141.IGI.IG.LOCAL) ([172.27.11.142]) by lrprdirn001-int.igi.ig.local with ESMTP/TLS/AES256-SHA256; 24 Apr 2017 08:40:42 +0100 Received: from BMPRDEXC142.igi.ig.local (172.24.11.72) by LMPRDEXC141.igi.ig.local (172.27.11.71) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Mon, 24 Apr 2017 08:40:41 +0100 Received: from BMPRDEXC142.igi.ig.local ([fe80::461:191b:6f0a:8242]) by BMPRDEXC142.IGI.IG.LOCAL ([fe80::461:191b:6f0a:8242%19]) with mapi id 15.00.1156.000; Mon, 24 Apr 2017 08:40:41 +0100 From: Michael Pearce To: "dev@hawq.incubator.apache.org" Subject: Re: s/gettimeofday/clock_gettime/ in hawq? Thread-Topic: s/gettimeofday/clock_gettime/ in hawq? Thread-Index: AQHSvMYBXO7ehUUve0Kh6SLoWLVx66HUIQ6F Date: Mon, 24 Apr 2017 07:40:41 +0000 Message-ID: <1493019734886.71870@ig.com> References: In-Reply-To: Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.25.10.21] x-ig-disclaimer: IG-Disclaimer-Set Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected archived-at: Mon, 24 Apr 2017 07:40:53 -0000 Hi, clock_gettime i believe was made native available in macOS Sierra (10.12). prior versions though don't afaik. Though with the aggressive upgrade of OS= X on apple devices that apple push, to end users is this really a concern? As per posix guidance also, what you suggest is also recommended as gettime= ofday is obsolescent. http://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html Regards Mike ________________________________________ From: Paul Guo Sent: Monday, April 24, 2017 6:36 AM To: dev@hawq.incubator.apache.org Subject: s/gettimeofday/clock_gettime/ in hawq? Hi, HAWQ sometimes use gettimeofday() syscall for some timeout check in various module, however it could be affected by ntp, so the timeout checking logic could be wrong sometimes. I would propose to use clock_gettime() to replace it on Linux (I have not investigated the alternative on other platforms e.g. mac). Both gettimeofday() and clock_gettime() are fast vdso sys call so I do not expect there is performance loss in some case where there are frequent calls of gettimeofday(). By the way, I found some gettimeofday() calls on postgresql and gpdb, so they might have this issue also. Regards, Paul The information contained in this email is strictly confidential and for th= e use of the addressee only, unless otherwise indicated. If you are not the= intended recipient, please do not read, copy, use or disclose to others th= is message or any attachment. Please also notify the sender by replying to = this email or by telephone (+44(020 7896 0011) and then delete the email an= d any copies of it. Opinions, conclusion (etc) that do not relate to the of= ficial business of this company shall be understood as neither given nor en= dorsed by it. IG is a trading name of IG Markets Limited (a company registe= red in England and Wales, company number 04008957) and IG Index Limited (a = company registered in England and Wales, company number 01190902). Register= ed address at Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Both I= G Markets Limited (register number 195355) and IG Index Limited (register n= umber 114059) are authorised and regulated by the Financial Conduct Authori= ty.