From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by sourceware.org (Postfix) with ESMTPS id 959963858413 for ; Thu, 16 Sep 2021 14:49:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 959963858413 From: Thomas Gleixner To: Paul Eggert , Peter Zijlstra , andrealmeid@collabora.com, mingo@redhat.com, dvhart@infradead.org, rostedt@goodmis.org, bigeasy@linutronix.de 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 Subject: Re: [PATCH 16/20] futex: Implement sys_futex_waitv() In-Reply-To: References: <20210915140710.596174479@infradead.org> <20210915141525.621568509@infradead.org> Date: Thu, 16 Sep 2021 16:49:21 +0200 Message-ID: <87tuika83y.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 16 Sep 2021 14:49:26 -0000 On Wed, Sep 15 2021 at 10:34, Paul Eggert wrote: > 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 call >> it a day? > > This would stop working in the year 2262. Not a good idea. Make it u64 and it stops in 2552, i.e. 584 years from now which is plenty. Lot's of the kernel internal timekeeping will stop working at that point, so that interface is the least of my worries. And TBH, my worries about the Y2552 problem are extremly close to zero. > 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. Which requires a 128bit division on every syscall for no value at all. Thanks, tglx