Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6621021rwr; Tue, 2 May 2023 03:09:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6J7e7j8n/2zemSWyzYgnpA4Gp6oLlFhFCz5SfO8NrjXM2//9lOeOoJ6lTBOAyn4szd9HX0 X-Received: by 2002:a17:903:268d:b0:1aa:e631:9f7f with SMTP id jf13-20020a170903268d00b001aae6319f7fmr8734758plb.41.1683022172866; Tue, 02 May 2023 03:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683022172; cv=none; d=google.com; s=arc-20160816; b=C8mc3At8vcFN1L+4o8HDZKo+e7NjapCBMwkTYnf/raUH+k7J9MWMOZu79XEa1fZy35 ECVBv4L0sR00RoofXRcwLFXShWnAf9b7l4hsQQ/6miidZFf+VbWRrp+xKovAVGOocBtb bnACTuo2HFkdam/QPF1xwpqq10h/4n6rVPLLqe/s5cgjtwEVcUrTjLTLGSwC5UCJWMWw tsAx3ZHbTSMF7oduWWHAPoeRNIGNf911A1+OsLXFB5HbqzBLIA9RpoEKmE6VtppdfH7a OOHYDdGlvSzagbVry3mXimIhafiPio+SdohXhbfahXztWz0Dbva9CdDaWcgGzm0GTaq6 +ugA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=WP45UZLouH7P7XcytGuJeWboTruXHCfJHtUPyso3Pdk=; b=SP6mZWvtEBrsHHrq97qtAlZwLJLn1dt/+/XM/VMfQC4jsszHd9h6IePVYqdxRH2+hz SeYi7OnR+WopMI3gJcQBBHxJoadBFFkZimlxijDCrxlu5lVcZNLjKPbOUa8nfxOb1QDA 56GycNl5NogJsYakiu+iKOnp8/G41UVsnsVsp35lHlhSY9lQg5zWBGSB9aO66s4wGQ9I gMIZM1dQ1BRKS2kmwU9LlzzdaQK9kjPDTNAHDQSendNUyr32DBoVu5td2dJPUUaXVhbf V3qQEPO31weGPIaL65KBfNJkxKQ4DLtzSO3yjeTi73uVX+CsbZqN6Lk4eRQYarW5V5xY yiZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170902650e00b001a1c005bd39si29756747plk.97.2023.05.02.03.09.19; Tue, 02 May 2023 03:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233588AbjEBKFX (ORCPT + 99 others); Tue, 2 May 2023 06:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbjEBKFT (ORCPT ); Tue, 2 May 2023 06:05:19 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 398404EC1 for ; Tue, 2 May 2023 03:05:16 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:f07a:92a2:297:162b]) by xavier.telenet-ops.be with bizsmtp id rm5C2900X5FQxRj01m5CsF; Tue, 02 May 2023 12:05:13 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1ptmse-000ykg-9i; Tue, 02 May 2023 12:05:12 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1ptmsi-00AtFX-7Q; Tue, 02 May 2023 12:05:12 +0200 From: Geert Uytterhoeven To: John Stultz , Thomas Gleixner , Jonathan Corbet Cc: Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] Documentation: timers: hrtimers: Make hybrid union historical Date: Tue, 2 May 2023 12:05:10 +0200 Message-Id: <59250a3d1c2c827b5c1833169a6e652ca6a784e6.1683021785.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Non-scalar time was removed from the ktime hybrid union in v3.17, and the union itself followed suit in v4.10. Make it clear that ktime_t is always a 64bit scalar type, to avoid confusing the casual reader. While at it, fix a spelling mistake. Fixes: 24e4a8c3e8868874 ("ktime: Kill non-scalar ktime_t implementation for 2038") Fixes: 2456e855354415bf ("ktime: Get rid of the union") Signed-off-by: Geert Uytterhoeven --- Randy did several fruitless attempts to fix the typo before. --- Documentation/timers/hrtimers.rst | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Documentation/timers/hrtimers.rst b/Documentation/timers/hrtimers.rst index 7ac448908d1ffd97..f88ff8bae89c8acf 100644 --- a/Documentation/timers/hrtimers.rst +++ b/Documentation/timers/hrtimers.rst @@ -123,17 +123,12 @@ equivalent to timer_delete() and timer_delete_sync()] - so there's no direct potential for code sharing either. Basic data types: every time value, absolute or relative, is in a -special nanosecond-resolution type: ktime_t. The kernel-internal -representation of ktime_t values and operations is implemented via -macros and inline functions, and can be switched between a "hybrid -union" type and a plain "scalar" 64bit nanoseconds representation (at -compile time). The hybrid union type optimizes time conversions on 32bit -CPUs. This build-time-selectable ktime_t storage format was implemented -to avoid the performance impact of 64-bit multiplications and divisions -on 32bit CPUs. Such operations are frequently necessary to convert -between the storage formats provided by kernel and userspace interfaces -and the internal time format. (See include/linux/ktime.h for further -details.) +special nanosecond-resolution 64bit type: ktime_t. +(Originally, the kernel-internal representation of ktime_t values and +operations was implemented via macros and inline functions, and could be +switched between a "hybrid union" type and a plain "scalar" 64bit +nanoseconds representation (at compile time). This was abandoned in the +context of the Y2038 work.) hrtimers - rounding of timer values ----------------------------------- @@ -148,7 +143,7 @@ a given clock has - be it low-res, high-res, or artificially-low-res. hrtimers - testing and verification ----------------------------------- -We used the high-resolution clock subsystem ontop of hrtimers to verify +We used the high-resolution clock subsystem on top of hrtimers to verify the hrtimer implementation details in praxis, and we also ran the posix timer tests in order to ensure specification compliance. We also ran tests on low-resolution clocks. -- 2.34.1