From patchwork Mon May 15 06:38:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hao Jia X-Patchwork-Id: 9327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6723887vqo; Mon, 15 May 2023 00:09:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RBnKx9NehSUU0bYxqVphi9VHsSjJali+fXwfnn71j+7tauZAOa9I9xS+Sq9tK9XaShPsd X-Received: by 2002:a17:903:41ca:b0:1ac:3fe0:d6ad with SMTP id u10-20020a17090341ca00b001ac3fe0d6admr39997095ple.65.1684134576514; Mon, 15 May 2023 00:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684134576; cv=none; d=google.com; s=arc-20160816; b=J/+YDe4WVeX7YiyW4w/IBwPTUPw5Ar6mGAOejPVk5p0KU52Haczu6QZIGiU91wp57J RL71v8lj4s0qOtVbdrtPXSLEvrRM1wFLcPLVdFIZLMUS3pXDPCzimCBLY6e5clPWvsti 0Hhl5aOVZpaVn2EtY5k4D4fv/2pUjDYAKz7OiLhRKKSOvIgLAgL+2AXgQgGliD4sJUMP A+PUzAd6AdQuHZY08uOhI2p2MS9Af/XCWHQRqImmx8e73aJOh/KxNdos7Dd0MPtC2s7J +qGwOv5oa7J11FxM6DEJXiylmrSUZgoXwA+X7nzHsc+cK3G7BqS2Nz23j0q/PkwTXgYd 47fQ== 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:dkim-signature; bh=CaSWQfDe0u1y4TJh5oORyZ3RjMtOPB8Z8Fj3lYEZXKU=; b=0I/7O1kQs9EXu0DdOh7JO/Uh43RLbERhZh/FNlsM4raRsq/fiiNxM2rgh33ceG9aPc 0Z82cguaUyo97t8xRyZ2KDwX0NQOLI368CbJvEmLWnGr5ZPUgwTAfsFQTyQNduIpmVmK HztR0gG5MsrSFD5JMJDLfL7NWy4PS/Ca/umhykjlubz27aHNkVNPHTYxiITiEtkMljMR rL/wNIqIR7MuJP957bUCdgQS2QjvmYsxG7btUwiBHLNTNnL765yyLcYAfFiNiiYZargM iKKHlak97c1Qj96kmy5jGJigVnEdDGBp8ZtfdQWEaeq/MrD65tCd4jcHevmiX70JXXar zvOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=JLtOiQsC; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170902b94600b001a531f29044si14509623pls.521.2023.05.15.00.09.24; Mon, 15 May 2023 00:09:36 -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=@bytedance.com header.s=google header.b=JLtOiQsC; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239991AbjEOGja (ORCPT + 99 others); Mon, 15 May 2023 02:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239963AbjEOGjX (ORCPT ); Mon, 15 May 2023 02:39:23 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B29FCF for ; Sun, 14 May 2023 23:38:58 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-52160f75920so8472205a12.2 for ; Sun, 14 May 2023 23:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684132738; x=1686724738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CaSWQfDe0u1y4TJh5oORyZ3RjMtOPB8Z8Fj3lYEZXKU=; b=JLtOiQsCc58HtoO4E4Yyc5eSsXRibMpTHz7FdBUjNru0nny2lEZ7xGLcVdnICqxyMw cMLSKKQ+ZDPqUhNm5apyCoV7uNFs6xvC+2Y9N9THA54+QgWEodvpBp2ltE4SbnGaEaev 8NapWiJBiy3rO8c1gwPw9jq8VTAfHpmsesTOvlZqR2hnQIK5RV5LOY4+HSzqeoFY4sUt oh2m/9tY4XtEdR0W/RyjLVwMwEIxqNWnevB6hHYY6Ta8bmgoRndSd4HN3MSYNxIvrfRb rSvQyHLS5iSIHbH58ptDkM+eofi7vQg4nvydg76itVMhlCxlfBl06SQpGD4TOdcupWkL MQZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684132738; x=1686724738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CaSWQfDe0u1y4TJh5oORyZ3RjMtOPB8Z8Fj3lYEZXKU=; b=SpAIps1xUUQ0hCxQHsOD7KvJmx3YWsuhuXdaGpqET28JS+wBGeALuJCRBErmydRp9C d0a72x2alKCyqh87xXg/hZFPL/h8yaE4Xw9nvJfX3L5XrrzfmtuMrL3++OliV9qPbEIp Nn3NzdWJlF8pIUgB0Ly1tgkZTg6Sr1PEBP8hIs+1YVPwcWN6YHf7XYpJQC+ys116yNPY V7TYTpHhBaB6Z2cJoGlwZIEc7aWtd4pfth2sl7LUen+vJUdjSl/QPoBtTK03OqkXQX0Q tmSPrSLGoJz2dIHaGtGvFGbuIrPBrfJe7FNX3mVNZEkryQjAriKsbdnI+0GbRVNZViPH 7x2g== X-Gm-Message-State: AC+VfDw7fEkF05tLgnpAluLDo0KE4nfRPb80K5yM91icaErjRsg1e49/ x8Rq7/aCnSnn5mNXSh/cEOntVg== X-Received: by 2002:a17:902:da89:b0:1ac:acb5:4336 with SMTP id j9-20020a170902da8900b001acacb54336mr26476900plx.33.1684132738134; Sun, 14 May 2023 23:38:58 -0700 (PDT) Received: from C02G87K0MD6R.bytedance.net ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id t1-20020a170902a5c100b001ab01598f40sm12608543plq.173.2023.05.14.23.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 May 2023 23:38:57 -0700 (PDT) From: Hao Jia To: mingo@redhat.com, peterz@infradead.org, mingo@kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, mgorman@techsingularity.net Cc: linux-kernel@vger.kernel.org, Hao Jia Subject: [PATCH v3 0/4] Fix some warnings about rq clock Date: Mon, 15 May 2023 14:38:44 +0800 Message-Id: <20230515063848.77947-1-jiahao.os@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765943097673812390?= X-GMAIL-MSGID: =?utf-8?q?1765943097673812390?= These four patches fix some warnings about rq clock. Patch1 fixes the warning of using the old rq clock caused by missing update rq clock. Patch2-4 fixes the warning that the rq clock was updated multiple times while holding the rq lock. v2->v3: - Modify the commit information of patch1 to make the description clearer. - Split v2 patch2 into 3 separate patches. v1->v2: - Vincent Guittot suggested using rq_clock_start_loop_update() to prevent multiple calls to update_rq_clock() in unthrottle_cfs_rq() instead of removing update_rq_clock() from unthrottle_cfs_rq() and updating the rq clock before unthrottle_cfs_rq() for patch2. [v2] https://lore.kernel.org/all/20230510083450.62334-1-jiahao.os@bytedance.com [v1] https://lore.kernel.org/all/20230410081206.23441-1-jiahao.os@bytedance.com Hao Jia (4): sched/core: Fixed missing rq clock update before calling set_rq_offline() sched/core: Avoid double calling update_rq_clock() in __balance_push_cpu_stop() sched/core: Avoid multiple calling update_rq_clock() in __cfsb_csd_unthrottle() sched/core: Avoid multiple calling update_rq_clock() in unthrottle_offline_cfs_rqs() kernel/sched/core.c | 7 ++++--- kernel/sched/fair.c | 18 ++++++++++++++++++ kernel/sched/sched.h | 21 +++++++++++++++++++++ kernel/sched/topology.c | 10 ++++++---- 4 files changed, 49 insertions(+), 7 deletions(-)