From patchwork Mon Jun 5 15:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 103336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2760813vqr; Mon, 5 Jun 2023 08:20:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KQjTBp+UwY0XPMgYteZ9TZWIo59DR0yM0uf50YC28b7jY2zPDZl63r6YmiCUJfX7fRxVF X-Received: by 2002:a05:6a20:a128:b0:10b:a9ca:97ca with SMTP id q40-20020a056a20a12800b0010ba9ca97camr8925135pzk.51.1685978427700; Mon, 05 Jun 2023 08:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685978427; cv=none; d=google.com; s=arc-20160816; b=FG504yTp27e5sgECxa6fC8zYlZ9mTAvT9o28hYNm26XaX1sUYGPpfpw0y1+IJqeuwy G8gmhN7aHQfL9mvPxL1hyB8sBgM7UksXK1J1Q/8cvjYh9qVRkwIUxMd2fTSP3TV9zVKa xIpDphaCy8l9tGvbexItwjxu6/Gsixa0fJn3Y+7Pc60YfF9E1S3ojQ7wgnEJOCsvzYac Ra975R4ZnUb809ARe5OFYTG4ITp+N+i6p8LMLMrRwdBWsoGBSOMghHJidXX4XlhQG3n2 Yu5JCCTrqqjecD7Zcym59yHaNGxOKFmVlIGOZMij53FKmB9zMZOj87LxxCRF8L3Lxjwn PmZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=xau9hnP+xB/FyBTuzfYxEESPSpayrKGs3N53kYahp90=; b=ZT5AzhDA+XNCBgaRey6++PE0ahbI8UYGlkqx5d7SPFcQIfT8RpuOkH1rS9wPfUl9Yb QQNC+sVPyj4cBZI5UOs8DyOW5eQimWRj6G0Fatq9PwGOlsIx8ckR8pUrNb4keNh7hmFL LttOaMZ4FStKJeQFhW2vhvV/F+rpWYJ3I/cqiL/ftvx6wVRsuqTmMmuLKnjpv+Y5LjeV v8DUagMyfjScOdRcYAKlRTNJ74x/6/hRCfs/BQnsYLWYikVisK9JN3ftWc8TLBhsiT6A phiQvEpiJ33+nXMBfCRo0H4wehHgDQ5NNQGWBaIODxrzWGLLhvqj8uzVp7Km8e+ecawT tvjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WXTNLZEx; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020aa7982a000000b006545ec4799asi4131220pfl.271.2023.06.05.08.20.15; Mon, 05 Jun 2023 08:20:27 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WXTNLZEx; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234685AbjFEPJE (ORCPT + 99 others); Mon, 5 Jun 2023 11:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234087AbjFEPIb (ORCPT ); Mon, 5 Jun 2023 11:08:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C12F3; Mon, 5 Jun 2023 08:08:30 -0700 (PDT) Date: Mon, 05 Jun 2023 15:08:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685977708; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xau9hnP+xB/FyBTuzfYxEESPSpayrKGs3N53kYahp90=; b=WXTNLZEx6XNVozuyardP+0hnkhacI/FxbQ38zclWzJfChtI7ByMLNGTf4dbmm9unoPQKrE BZbpKcxj5gE+LtlSQjK6QJ38M3FerjasX+WKW2CyPO1CGFP7XHqHs4+bhSzGgDqhqOLq34 4f0d7Q/a1C0bySi/t0Up3a8/DkEVeQqNDaosWX3Ui2GyTmHltSTqlxvQVOcUDqEWI494zq U+nTuAYuqTfk0r1TlrGG8TxYgUsMrBlEv2LSKMYgPohKksBkCXy3zmbuZDO4pDEqI1YISI JmYF6ykzcr5idG8LWgyDCoZUdNr8fK1TG3JUhV5JVbzgQM2RQo8jmFJOTgBKcg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685977708; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xau9hnP+xB/FyBTuzfYxEESPSpayrKGs3N53kYahp90=; b=BIllHdgV3oA2aoc9HUFKFp5qBH2W2Xy4Ts62MoHlfV4TRSVn+0AUnqgpZ7ytjwtE9CRSqZ pXIZWUJArFhL9/Bw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] posix-timers: Document sys_clock_getoverrun() Cc: Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230425183313.462051641@linutronix.de> References: <20230425183313.462051641@linutronix.de> MIME-Version: 1.0 Message-ID: <168597770840.404.11783761312188039507.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764175305624188796?= X-GMAIL-MSGID: =?utf-8?q?1767876515828156214?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 1adc8de86737c3d134c2da5ed8e56c2de4729923 Gitweb: https://git.kernel.org/tip/1adc8de86737c3d134c2da5ed8e56c2de4729923 Author: Thomas Gleixner AuthorDate: Tue, 25 Apr 2023 20:49:14 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Jun 2023 17:03:38 +02:00 posix-timers: Document sys_clock_getoverrun() Document the syscall in detail and with coherent sentences. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230425183313.462051641@linutronix.de --- kernel/time/posix-timers.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 663d3c6..67c1d4d 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -783,14 +783,23 @@ SYSCALL_DEFINE2(timer_gettime32, timer_t, timer_id, #endif -/* - * Get the number of overruns of a POSIX.1b interval timer. This is to - * be the overrun of the timer last delivered. At the same time we are - * accumulating overruns on the next timer. The overrun is frozen when - * the signal is delivered, either at the notify time (if the info block - * is not queued) or at the actual delivery time (as we are informed by - * the call back to posixtimer_rearm(). So all we need to do is - * to pick up the frozen overrun. +/** + * sys_timer_getoverrun - Get the number of overruns of a POSIX.1b interval timer + * @timer_id: The timer ID which identifies the timer + * + * The "overrun count" of a timer is one plus the number of expiration + * intervals which have elapsed between the first expiry, which queues the + * signal and the actual signal delivery. On signal delivery the "overrun + * count" is calculated and cached, so it can be returned directly here. + * + * As this is relative to the last queued signal the returned overrun count + * is meaningless outside of the signal delivery path and even there it + * does not accurately reflect the current state when user space evaluates + * it. + * + * Returns: + * -EINVAL @timer_id is invalid + * 1..INT_MAX The number of overruns related to the last delivered signal */ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id) {