From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3D2FE1F8C6 for ; Wed, 15 Sep 2021 17:34:35 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22AB3385783D for ; Wed, 15 Sep 2021 17:34:34 +0000 (GMT) Received: from zimbra.cs.ucla.edu (zimbra.cs.ucla.edu [131.179.128.68]) by sourceware.org (Postfix) with ESMTPS id E75DD3858419 for ; Wed, 15 Sep 2021 17:34:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E75DD3858419 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 17F8A160152; Wed, 15 Sep 2021 10:34:20 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id I3w-vMnz_MK5; Wed, 15 Sep 2021 10:34:19 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D9196160153; Wed, 15 Sep 2021 10:34:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NItS-eVDZCFe; Wed, 15 Sep 2021 10:34:18 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 34E4D160152; Wed, 15 Sep 2021 10:34:18 -0700 (PDT) To: Peter Zijlstra , andrealmeid@collabora.com, tglx@linutronix.de, mingo@redhat.com, dvhart@infradead.org, rostedt@goodmis.org, bigeasy@linutronix.de References: <20210915140710.596174479@infradead.org> <20210915141525.621568509@infradead.org> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: [PATCH 16/20] futex: Implement sys_futex_waitv() Message-ID: Date: Wed, 15 Sep 2021 10:34:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dave@stgolabs.net, libc-alpha@sourceware.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, mtk.manpages@gmail.com, kernel@collabora.com, krisman@collabora.com Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 9/15/21 8:37 AM, Peter Zijlstra wrote: > I utterly detest timespec.. it makes no sense what so ever. >=20 > Can't we just, for new syscalls, simply use a s64 nsec argument and cal= l > it a day? This would stop working in the year 2262. Not a good idea. Any improvements on struct timespec should be a strict superset, not a=20 subset. For example, you could advocate a signed 128-bit argument=20 counting in units of attoseconds (10=E2=81=BB=C2=B9=E2=81=B8 s), the high= est power-of-1000=20 resolution that does not lose info when converting from struct timespec.=20 This could use __int128 on platforms that have it, a two-integer struct=20 otherwise. I'm not sure this is a hill I'd want to die on. That being said, it=20 would be cool to keep up with the people in the building near mine who=20 are researching attosecond imaging (tricky because the uncertainty=20 principle means attosecond laser pulses must have very broad spectra).=20 And extending struct timespec on the low end is clearly the way to go,=20 since its high end already goes back well before the Big Bang. I hope you don't mind my going off the deep end a bit here. Still, the=20 point is that if we're going to improve on struct timespec then it=20 really should be an improvement.