From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by sourceware.org (Postfix) with ESMTPS id 46372388C039 for ; Mon, 21 Jun 2021 07:43:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 46372388C039 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=denx.de Received: from ktm (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 1C3E482998; Mon, 21 Jun 2021 09:43:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1624261414; bh=SH5Y0gwJEkDpE3bjvgl94RMZldksyWAUxbSYx77hBhc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l4w17bQ72RZEoOvlaTqH3+45ijM6pKGwBZF6VRy+onWW2zQl0ymxwCJiG75KFBDFT be2gWpM8mHmFAk1z85WthM+quYIwP6NfKD5qHtRxODE24owaCjt+oy14Bbg1szjdbt Yg0687Sxmurp5/sZq55K8dRgjNUrfRcSHZsQ8Nms8TygNw8+MewrG2eEC4N1OQR6CS q3WL+iC9PRGuZmMZt42BRYiQPWGawXi8roxHHUKizRk7T3CARaBUmJF3Cic4B9eSIU /Zxti38V2w0dIRyp28igIj1wFoR1TSfySFEjMJ6RWjwRjqIQENeM+PJnC8czj0M/E3 IE6Gj+lmQomRw== Date: Mon, 21 Jun 2021 09:43:33 +0200 From: Lukasz Majewski To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Carlos O'Donell Subject: Re: [PATCH 08/18] linux: Remove supports_time64 () from clock_gettime Message-ID: <20210621094333.010677de@ktm> In-Reply-To: <20210617115104.1359598-9-adhemerval.zanella@linaro.org> References: <20210617115104.1359598-1-adhemerval.zanella@linaro.org> <20210617115104.1359598-9-adhemerval.zanella@linaro.org> Organization: denx.de X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/2enFhrsF=S13sH.FLYXOfGH"; protocol="application/pgp-signature" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 21 Jun 2021 07:43:37 -0000 --Sig_/2enFhrsF=S13sH.FLYXOfGH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 17 Jun 2021 08:50:54 -0300 Adhemerval Zanella wrote: > It breaks the usage case of live migration like CRIU or similar. > The performance drawback is it would require an extra syscall > on older kernels without 64-bit time support. >=20 > Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel > (with and without --enable-kernel=3D5.1) and on x86_64-linux-gnu. > --- > sysdeps/unix/sysv/linux/clock_gettime.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) >=20 > diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c > b/sysdeps/unix/sysv/linux/clock_gettime.c index > 781d05c2fd..cfe9370455 100644 --- > a/sysdeps/unix/sysv/linux/clock_gettime.c +++ > b/sysdeps/unix/sysv/linux/clock_gettime.c @@ -22,7 +22,6 @@ > #include > #include "kernel-posix-cpu-timers.h" > #include > -#include > #include > =20 > /* Get current value of CLOCK and store it in TP. */ > @@ -35,19 +34,14 @@ __clock_gettime64 (clockid_t clock_id, struct > __timespec64 *tp) # define __NR_clock_gettime64 __NR_clock_gettime > #endif > =20 > - if (supports_time64 ()) > - { > #ifdef HAVE_CLOCK_GETTIME64_VSYSCALL > - r =3D INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp); > + r =3D INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp); > #else > - r =3D INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp); > + r =3D INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp); > #endif > =20 > - if (r =3D=3D 0 || errno !=3D ENOSYS) > - return r; > - > - mark_time64_unsupported (); > - } > + if (r =3D=3D 0 || errno !=3D ENOSYS) > + return r; > =20 > #ifndef __ASSUME_TIME64_SYSCALLS > /* Fallback code that uses 32-bit support. */ Reviewed-by: Lukasz Majewski Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/2enFhrsF=S13sH.FLYXOfGH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmDQQyUACgkQAR8vZIA0 zr23Agf/febtH7Lxu0ImaWjNFbzgh6L1xnvmW3ZkyZfFh6uLh6Q0KCvbmaoxCt1V ZmJ4LpaEpD74wNvSC5G+FYPZLNk0o9xu3ZsZb5xlsAE6fIrNWXB3tZMXbJpgiZEG G3BJXmZCGEAkTFqpRU1I9jPBrRMAWRrBmS+2UxLyAAkm1rwGtv6e5YdNQDe8hm4o uHZ0ggrMUAAsNRCfA1+I8N6UKevzCJYfzi6EboK+/UjyBP7hdl4xK79/rLld2WR1 OSjT3A0Y+UGdPXtTb28joNycJu+v7QnjD7Rd9h0XBN5/lYWX16X1Q4pKM0ERqG5N ULABDToO2rIvHiv92qjuQHYXqPKqog== =pNB8 -----END PGP SIGNATURE----- --Sig_/2enFhrsF=S13sH.FLYXOfGH--