From patchwork Sun Jun 18 20:49:59 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: 109679 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2639784vqr; Sun, 18 Jun 2023 14:06:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FAEjvnc1aLEYPm5Nx6XVrZatnoieP6yl58QYZhqKVDiyyzHeMgkFqHt7izfybNxVhxL7m X-Received: by 2002:a9d:4e90:0:b0:6b0:c963:6cba with SMTP id v16-20020a9d4e90000000b006b0c9636cbamr7157374otk.13.1687122414734; Sun, 18 Jun 2023 14:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687122414; cv=none; d=google.com; s=arc-20160816; b=Ptq0iwlGiXvqskk/163qubI4lu8bkazt40nhcJBItZB7QE8qIW+mVmW92s68zXUs+F yWEiPZEvETMUS/yA1+COZBJ7rlwf+20msVny7OXOhRVvCSWaW9GRPk88LnkzPDd+4OEM PVA+8rzhcjhD7NljoL/mK3L0GsCKDfuxrboCRSFlP/VgPat0SBrXyOzXFr45kNSNkh4D 7JgNJ8lKFGIIVUrofW5wfshQwRUSuDFhy5V8D38VqnNHrvU346cMJNmNXPk4gGJO4AAc ciJXT8tg4ncG7fDIXxxAAxloBzbj5+/lMu9MI0vNYXI18H3NuQEHavB1pqxpouznUOiz gTcg== 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=N7RBMQAyFoU1tLMB7KHZWr2nij7mtaFgUK/OgRAYfUw=; b=Tu7Sa9xmS5mZJerjwpwcGf2rEtHfvFg4Y1U+Z7sfgIDtioEUVhbRX1IJ8SAnMEG6GB x3wW6hfT8qL3KwfrGP/1hvUOT3pZBwEqgLOcNsB4kigqTLs2Fp7WqJvxTZPZXvwuvEiz S0ySzuPaYn6taezx0Mc/22md3DiVVFDsu0v4xWE3T3cvF4jNnz/2Awrpur9caSifQOeu WOpi40B3sDuEJI133UIv91wX3HYQHlo3BqobUroGiJrCLZKZxuhb99h4t7ABkHZm26sy a4u0cLzN9ND7ry0xhNpGLsE6lL4lVVykzgFqXaq6O4Ga20w4aVLRn7PnaEmj/YN0yojY IE4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v0QtCh3e; dkim=neutral (no key) header.i=@linutronix.de header.b=xvCAAGz+; 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 k1-20020aa79d01000000b0063b68fa0807si4041323pfp.263.2023.06.18.14.06.40; Sun, 18 Jun 2023 14:06:54 -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=v0QtCh3e; dkim=neutral (no key) header.i=@linutronix.de header.b=xvCAAGz+; 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 S229776AbjFRUuh (ORCPT + 99 others); Sun, 18 Jun 2023 16:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjFRUuC (ORCPT ); Sun, 18 Jun 2023 16:50:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1D3E49; Sun, 18 Jun 2023 13:50:01 -0700 (PDT) Date: Sun, 18 Jun 2023 20:49:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687121400; 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=N7RBMQAyFoU1tLMB7KHZWr2nij7mtaFgUK/OgRAYfUw=; b=v0QtCh3e7hZrqp4xBt3Wjfw6DFrUO5dNwCq9ZXuRHvYSpbuvIS7ATP1BE8jWlcWC/c8DX3 SUmmrBHNS91zKPjhjM1AULEquw5X1CkPnwNS+Wiy8UEgFP2Xi68P8wCTKfY8osEf0dovvN /T5grC1RrhWVmNYW6x9iSgomZGz3mUc2nialW7kU0Gha2GljbA6PU/T/JAalEprr536R6r uX59vPfk/glTV4+lahLO3TMTNj7bXFaepPmmoBrLMY4d13wWlL51TrizwxlPH40Gx489Bj TwDCNG9O7wnvWrv5SvXZHQKfxHeph7ad54Ii/0xLiYSx3S68DEGz42pQwEdK2w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687121400; 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=N7RBMQAyFoU1tLMB7KHZWr2nij7mtaFgUK/OgRAYfUw=; b=xvCAAGz+ZkdQu3wRaKDYQXi68d1Fy6jqo25CQx4bvO8GfueKc774Sfjep7JaE/1h+V9gpl FHFHBRhqlavyElAw== 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 nanosleep() details Cc: Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230425183313.567072835@linutronix.de> References: <20230425183313.567072835@linutronix.de> MIME-Version: 1.0 Message-ID: <168712139985.404.3194019800908036645.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?1764176777347475594?= X-GMAIL-MSGID: =?utf-8?q?1769076073250380800?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 640fe745d7d4b6e47f3b455cb5de99a08c6b6d23 Gitweb: https://git.kernel.org/tip/640fe745d7d4b6e47f3b455cb5de99a08c6b6d23 Author: Thomas Gleixner AuthorDate: Tue, 25 Apr 2023 20:49:17 +02:00 Committer: Thomas Gleixner CommitterDate: Sun, 18 Jun 2023 22:41:51 +02:00 posix-timers: Document nanosleep() details The descriptions for common_nsleep() is wrong and common_nsleep_timens() lacks any form of comment. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230425183313.567072835@linutronix.de --- kernel/time/posix-timers.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 03ef6af..54adb4c 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -1370,7 +1370,7 @@ SYSCALL_DEFINE2(clock_getres_time32, clockid_t, which_clock, #endif /* - * nanosleep for monotonic and realtime clocks + * sys_clock_nanosleep() for CLOCK_REALTIME and CLOCK_TAI */ static int common_nsleep(const clockid_t which_clock, int flags, const struct timespec64 *rqtp) @@ -1382,8 +1382,13 @@ static int common_nsleep(const clockid_t which_clock, int flags, which_clock); } +/* + * sys_clock_nanosleep() for CLOCK_MONOTONIC and CLOCK_BOOTTIME + * + * Absolute nanosleeps for these clocks are time-namespace adjusted. + */ static int common_nsleep_timens(const clockid_t which_clock, int flags, - const struct timespec64 *rqtp) + const struct timespec64 *rqtp) { ktime_t texp = timespec64_to_ktime(*rqtp);