From patchwork Mon Jun 5 15:08:27 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: 103325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2753265vqr; Mon, 5 Jun 2023 08:10:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6FK+KS6SuYGwNbEzTifjYaGBpVV+Tsz2Un5Z/I65rR/ZWpYJS78bC4Gs9BT7dLjW37uwFs X-Received: by 2002:a05:6a20:e192:b0:10e:e813:46ed with SMTP id ks18-20020a056a20e19200b0010ee81346edmr6460739pzb.43.1685977806665; Mon, 05 Jun 2023 08:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685977806; cv=none; d=google.com; s=arc-20160816; b=eXTLmvaSHfLWJoxusGWxg/Gpda/bALrFGkCZhog7s+BqefMGQddihWorOd/9PVLMsO UoSdSE0S7ZG7J68+YtTivlyBBwB62ICJHpKe6j570jKq8zxUJekcEOgBc6b2RDmEtCeN aKvSEGXUFPzR6ZZoQF7fPaPXT0mSpjBgUEIWPRLL1lln+QW2/K4lzHS7MYwsrxaa4tg3 KLzkTbj+ANzG8z7CtiNlHLG/f1GBn8qAna1cbuNtHgSx7zwUubf2VADNreU1tZT3Bd6U sWVQBoK6kWkVlo7RlH3qrRi5hz6Im9pv+Jf58Zug5jJw3ahnykmAjmxU8ZrdpRIHAc0u a7Cg== 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=RoWJhGlkrPutICGc7rmHeduSzyk5VXIUCCAZUGIdmZA=; b=eF/adQhUCZE2A2YkKt/jVj/o3rPFAfgWr7fK5uNqbev2CNqiO2rvmcrQzQzuYboK8T hConOHFSGDUI4sxf8rKD01DF8kudPeNnuM1XgllBB4ciDosuNnRyHU/Mz1rdLGCI7BUa 8PpYHZDD7FpInJX8IlqkutTzYmNvLjo2qhEea26POBLI2aZpriifIaDnVFq6uqv0EE3a jvD8oKuOMi0dUnbzOz6vo8iMsReplCFCT5N37byRDf0PtAc/DepYJKCOo0qLHNErr/xo hcJniecqMcMuPTdZBvDAwsscG65OrXWUD1lu16Xbb6dyjdLUZzvrFdr+73HbQ208BV9t GGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yrqU0qkF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 bm18-20020a656e92000000b0052c575f1d8dsi5659936pgb.260.2023.06.05.08.09.52; Mon, 05 Jun 2023 08:10:06 -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=yrqU0qkF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S234599AbjFEPI6 (ORCPT + 99 others); Mon, 5 Jun 2023 11:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233932AbjFEPIa (ORCPT ); Mon, 5 Jun 2023 11:08:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8798FF2; Mon, 5 Jun 2023 08:08:29 -0700 (PDT) Date: Mon, 05 Jun 2023 15:08:27 -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=RoWJhGlkrPutICGc7rmHeduSzyk5VXIUCCAZUGIdmZA=; b=yrqU0qkFFGzc4V6akX08luOHlQqbf/KLaqDtUCSA27p+ZZsRXsjedaFxvz+4kNQnzxdEd9 yJ/0acy+CIvXIjwnNMi9mAZdU5bN5fB7ZqPj9Bs0518QOIl5ycJ9m/lNComD1SPM2Bms76 F2OHZrR7K+PsihaeP1jWkSMYuox1JtbkEP638Il5Lm4z6TvEOVeRo6GT/kdWa0mqCciH/W eXnTGc3XfxIVBJmSqPZrd08v8+DRQeVN9+k7yvAUFXoG4Mc8Cu+XJTphJ6VhA5sTYlrl53 lvJvl8OOjkjTbVLL58sxeNORL+6282WO1XzGmrR1Soh47OEkICvu6NRDEDCJJQ== 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=RoWJhGlkrPutICGc7rmHeduSzyk5VXIUCCAZUGIdmZA=; b=B/QUh7fArb2UmWGkSRWf/MhK1jd8fQpPDmOeNe1kLHyHUBefnTU4l96crT16VgrhHBZjki 0f6NzRxpzYqBTiAQ== 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: <168597770779.404.11242027713171629061.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?1767875864447753152?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 13da885685d6ae339f2924d3c8a1f4fe16a904cc Gitweb: https://git.kernel.org/tip/13da885685d6ae339f2924d3c8a1f4fe16a904cc Author: Thomas Gleixner AuthorDate: Tue, 25 Apr 2023 20:49:17 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Jun 2023 17:03:38 +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 9d99d4b..9ce13c9 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);