From patchwork Mon Oct 16 11:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 153361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3403433vqb; Mon, 16 Oct 2023 04:56:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH12Lwe02SPtMB69B/GrNcvSkcdWTN0R/YHO6R0bYRo5P/Sp3xNf4Klk/vUyYtzAta9nppK X-Received: by 2002:a05:6602:3a05:b0:792:6be4:3dcb with SMTP id by5-20020a0566023a0500b007926be43dcbmr35663717iob.2.1697457372911; Mon, 16 Oct 2023 04:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697457372; cv=none; d=google.com; s=arc-20160816; b=UBtuUiYtUFlZXLEea2U7hI3eIsVIsBRm6Vj8zSs6Pvt7Zf+TAZhNHT21tA6cMtkh/M 71LaIOkwOQ9h9iDhlF7sgnPSSs4sS2zVWzRDdTd+tlnc6fag7u7SCW3dvgRTEr5exIwu GujmRIAkM4jqe7SGxrqkLr7A8we4mPhOZYwwATNgqFOfRMqbQY+yuKbsWFZiR0glN5J4 UF51g50I52uz6TktMueodvOIqvV0y8ZK2JBbKi5rRtTfzlfW6v6/a7tBhCO5U5fMgwLu 3+9UOD8HUqw1osQOrL8bX1s7Gvac1lDsYzpYBYhOUeHEll3WAtZ1OFUpU/zaBnw+yqHH 3kFg== 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=t+VpWdgy8ZpqWtZDYHsFaab24OYQaDMpzdaC2RrZl5s=; fh=quMaK1OuFTzzi2BdRRSLlDl+dR5adrGs+zRqyA70Z2U=; b=YYOKfS3V1xBj/eCqkK/jEvaHizoKOp3Taw1HJfvvKR40wTQAtORuanaeTqmvzsFkU7 Jr8iNw9t43bAM/uGONjrqgcCORYK9bQsXur+wUdI9igpikJ0VMSHKQJA2ATCVnSnchEx BiMb8tgI9EeUVveTTMD1FPXw9f36g4TW1sCOf5IuYw7hjjAxp56wnLo0dg38m/Agp+qo k+OZXbqXRcLHYlOYoFWaQ1nxue1KnijopUsVCBLJfap+F0Vq/qIussCsyoGBqcIORh1U Ys7IJ2x66FtWoT/HJ/ANcy8/pNariuSJulyjcsRrM96LfBhsAfdr8gjkwKyBoUHkeHsF gAFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=z8s1jNSZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id fa13-20020a056a002d0d00b006b2b53de986si7398593pfb.194.2023.10.16.04.56.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 04:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=z8s1jNSZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C6B5F808599C; Mon, 16 Oct 2023 04:55:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbjJPLzE (ORCPT + 18 others); Mon, 16 Oct 2023 07:55:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjJPLyr (ORCPT ); Mon, 16 Oct 2023 07:54:47 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A31801B5; Mon, 16 Oct 2023 04:54:38 -0700 (PDT) Date: Mon, 16 Oct 2023 11:54:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697457277; 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=t+VpWdgy8ZpqWtZDYHsFaab24OYQaDMpzdaC2RrZl5s=; b=z8s1jNSZZ2SSZJKekPQ48D4Q09vevYNOKcQ7gw8DGGfZlmA1RBG2L74LjMNGoYlkpj76cF pp0aGsOP21sUpWsg+A46RQgFFdVgRwvCpx/M1FCww46I+20s3KPwrRsQ0DUeWNnKyfCld0 oBIgsPdwCAHSGZ77IDlao1E6zbuG67y2tneLg/XgnufbRUH07U5Xgx3vdW9QJJkxqf5Yyw baKNtzhEqj+6R90CBJoqbySaM1dlDDfa8+qAeX6WsL63Gfmfl3DOb2lHkAkokCLsMD3GCF u3CbGPam31QPLQgj+Zm0jS/Y+IY+f+De030XdyTO1UDf0RjnT7CYatX519+1mw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697457277; 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=t+VpWdgy8ZpqWtZDYHsFaab24OYQaDMpzdaC2RrZl5s=; b=S/PQ+8n0GVcY1SliilKyavL/jEks+PPdlNDI3kz/mgdlANkDmTjpSNvoM3LWgbR4v50FZ8 L1xIGWdAUoqm2PDA== From: "tip-bot2 for Fan Yu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/psi: Update poll => rtpoll in relevant comments Cc: Fan Yu , Ingo Molnar , Johannes Weiner , Suren Baghdasaryan , Peter Ziljstra , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <202310161920399921184@zte.com.cn> References: <202310161920399921184@zte.com.cn> MIME-Version: 1.0 Message-ID: <169745727623.3135.4814080026088715141.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 04:55:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779913062082275894 X-GMAIL-MSGID: 1779913062082275894 The following commit has been merged into the sched/core branch of tip: Commit-ID: 7b3d8df549390e797f883efa16224fa0dfe35e55 Gitweb: https://git.kernel.org/tip/7b3d8df549390e797f883efa16224fa0dfe35e55 Author: Fan Yu AuthorDate: Mon, 16 Oct 2023 19:20:39 +08:00 Committer: Ingo Molnar CommitterDate: Mon, 16 Oct 2023 13:42:49 +02:00 sched/psi: Update poll => rtpoll in relevant comments The PSI trigger code is now making a distinction between privileged and unprivileged triggers, after the following commit: 65457b74aa94 ("sched/psi: Rename existing poll members in preparation") But some comments have not been modified along with the code, so they need to be updated. This will help readers better understand the code. Signed-off-by: Fan Yu Signed-off-by: Ingo Molnar Cc: Johannes Weiner Cc: Suren Baghdasaryan Cc: Peter Ziljstra Link: https://lore.kernel.org/r/202310161920399921184@zte.com.cn --- kernel/sched/psi.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 519bc92..7b4aa58 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -596,7 +596,7 @@ static void init_rtpoll_triggers(struct psi_group *group, u64 now) group->rtpoll_next_update = now + group->rtpoll_min_period; } -/* Schedule polling if it's not already scheduled or forced. */ +/* Schedule rtpolling if it's not already scheduled or forced. */ static void psi_schedule_rtpoll_work(struct psi_group *group, unsigned long delay, bool force) { @@ -636,37 +636,37 @@ static void psi_rtpoll_work(struct psi_group *group) if (now > group->rtpoll_until) { /* - * We are either about to start or might stop polling if no - * state change was recorded. Resetting poll_scheduled leaves + * We are either about to start or might stop rtpolling if no + * state change was recorded. Resetting rtpoll_scheduled leaves * a small window for psi_group_change to sneak in and schedule - * an immediate poll_work before we get to rescheduling. One - * potential extra wakeup at the end of the polling window - * should be negligible and polling_next_update still keeps + * an immediate rtpoll_work before we get to rescheduling. One + * potential extra wakeup at the end of the rtpolling window + * should be negligible and rtpoll_next_update still keeps * updates correctly on schedule. */ atomic_set(&group->rtpoll_scheduled, 0); /* - * A task change can race with the poll worker that is supposed to + * A task change can race with the rtpoll worker that is supposed to * report on it. To avoid missing events, ensure ordering between - * poll_scheduled and the task state accesses, such that if the poll - * worker misses the state update, the task change is guaranteed to - * reschedule the poll worker: + * rtpoll_scheduled and the task state accesses, such that if the + * rtpoll worker misses the state update, the task change is + * guaranteed to reschedule the rtpoll worker: * - * poll worker: - * atomic_set(poll_scheduled, 0) + * rtpoll worker: + * atomic_set(rtpoll_scheduled, 0) * smp_mb() * LOAD states * * task change: * STORE states - * if atomic_xchg(poll_scheduled, 1) == 0: - * schedule poll worker + * if atomic_xchg(rtpoll_scheduled, 1) == 0: + * schedule rtpoll worker * * The atomic_xchg() implies a full barrier. */ smp_mb(); } else { - /* Polling window is not over, keep rescheduling */ + /* The rtpolling window is not over, keep rescheduling */ force_reschedule = true; } @@ -674,7 +674,7 @@ static void psi_rtpoll_work(struct psi_group *group) collect_percpu_times(group, PSI_POLL, &changed_states); if (changed_states & group->rtpoll_states) { - /* Initialize trigger windows when entering polling mode */ + /* Initialize trigger windows when entering rtpolling mode */ if (now > group->rtpoll_until) init_rtpoll_triggers(group, now);