From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 222933888030 for ; Mon, 12 Jul 2021 11:55:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 222933888030 Received: by mail-pf1-x42e.google.com with SMTP id 17so16179717pfz.4 for ; Mon, 12 Jul 2021 04:55:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DSw+MyDgxV32p08NHnj+eDa1ir6P+GXYOLvalCOOoIY=; b=sNI/C8Mzkf0W4uYUHdDh+5N0tydjXinumbkwReDky0rigZ8L5Rs07b4VDWj8Y4oKac Yf9lgurFS7uSq18eCSbCX25ANx7YIfjSoodJp6fwmb3sBULxJ8PVhBTquUuBh9vilr6g sWAyst0mWgvjNVAcvSzOosWM0TkRszrKaJ+KOkjSj44BIMOtFpGbblaFUEjZjuv+Yh2z tlESXk5jkM6BIrPcf999cWr46qvYATUiwbcSo1uvuARJnDSG9UyMR29gPUm0PatVNNm8 0NcFiwFsjKbYo4aYx/7K90dpHj7W5lXYHjHrWsuDpGZBTPYQEUwfAPRLM9E2BvrxhGni Rqag== X-Gm-Message-State: AOAM531OqcBvx1OyU4jqSHTfJrSgwzH6Mw8bwpIclyTlZ2V8DjCSFXg7 cOAN9J++NXgDBrBzHoqJJ7E3minL2+2vbA== X-Google-Smtp-Source: ABdhPJznUBi9lR/tmNlnCjsZN64Bu5f1drpbMK29qOiOp15JP9jhTgo6hbQQ1QpFSIxNosihE+Rehg== X-Received: by 2002:a63:4b09:: with SMTP id y9mr52970726pga.350.1626090934962; Mon, 12 Jul 2021 04:55:34 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id m24sm2473951pgv.24.2021.07.12.04.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jul 2021 04:55:34 -0700 (PDT) Subject: Re: [PATCH] Linux: Use 32-bit vDSO for clock_gettime, gettimeofday, time (bug 28071) To: Florian Weimer Cc: libc-alpha@sourceware.org References: <87czrqf5un.fsf@oldenburg.str.redhat.com> <878s2ef19p.fsf@oldenburg.str.redhat.com> <874kd2ey6s.fsf@oldenburg.str.redhat.com> <158cdbcb-5335-9ff4-cf3e-a45d8603d029@linaro.org> <878s2bdddm.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: Date: Mon, 12 Jul 2021 08:55:33 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <878s2bdddm.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: Mon, 12 Jul 2021 11:55:38 -0000 On 12/07/2021 07:40, Florian Weimer wrote: > * Adhemerval Zanella: > >> Using the test (a slight modified one from the bug report): >> >> -- >> #include >> #include >> #include >> >> int >> main (void) >> { >> struct timespec ts; >> errno = 0; >> clock_gettime (CLOCK_REALTIME, &ts); >> printf ("errno = %m (%d)\n", errno); >> errno = 0; >> clock_gettime (CLOCK_MONOTONIC, &ts); >> printf ("errno = %m (%d)\n", errno); >> } >> -- >> >> I see no syscall on 5.11 kernel, only a clock_gettime (CLOCK_MONOTONIC) >> on the 4.4 and a clock_gettime_time64 plus a clock_gettime on the 3.10. > > This still introduces a severe performance regression on older kernels. > It may well make some exsting 32-bit applications unusable until the > kernel is upgraded. I'm not sure if this is a good idea. > > At least I can see that the clobbering of errno is gone. Yes and this how we initially decided to provide 64-bit time_t support, where 32-bit implementations are done on top of 64-bit ones. I am not very fond of starting to adding 32-bit specific implementations, the complexity to fix some specific cases do not really pay in the long term imho. We might also add back the global time64 internal variable that indicates if the kernel supports 64-bit (removed by 9465c3a9fb557), but it also has its ow issues (live migration like CRIU).