From patchwork Tue Oct 31 12:59:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yajun Deng X-Patchwork-Id: 16100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp215934vqg; Tue, 31 Oct 2023 06:00:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECPkeklO4s7mCMeu5Qs6qZ499pOd0nNHIKUt71GSUTmMFGUQ1aIV0uNksGoUf6NT6w7dFw X-Received: by 2002:a05:6a20:7286:b0:17a:e2b9:77e0 with SMTP id o6-20020a056a20728600b0017ae2b977e0mr3343641pzk.7.1698757199813; Tue, 31 Oct 2023 05:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698757199; cv=none; d=google.com; s=arc-20160816; b=lXBw2V1hGwz/zTmpYwpgHZjdr5JGdelxhEGOHDHJfcJu9Ay2XwkzcapdegnCRuKa3P IWqE+m8UNhlEyV2d1AyavB+Nt/FUQo/ZWpd7QHPPiS7FHkYxow5mcipWYJfGw5OlaqKm d3OPjqzcBxjYliIy1ZVXkto4KhFULNu3Br7wCgjMYEqj3qu3jQ0x2VPTqy3X2uFv7iYM PchdgfziukIEHFf3ggKYNBwcZPR21XnWCf5C+DBFkpwBry7lyZntc3ncVx3si9yIvl/9 SH3VOJAz+d4x2Mz0ENyaXw/VGp254f5GFvarUUNpCuGflCOnsy5VTyo6FzDibI+TaTQc 2mvg== 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=IDMC1GkRNk1k2ztG8ptBV6onAW6A2wHvK6RivRZoKp4=; fh=kY5sJNvn29qhEh2SatEVpXE2cTkcQ8AnU+xu9Bnn8Ic=; b=eO55gEGTNxTPzzldLU0I0NllFRnth13G6lVMbseKvHwMpAdrILQruyl6s+6YSwVplu M9PXsbmc8cDkXH+MMnKQ2ij72lcgtczbxsK9AOKBD+Tb6jzWIm1stuNnPrLTvsiOejpq v77t9z+ibcyVbTgXj4GohHBOeWMp/bt/PX+jvvHTOuzTQDBW574y7KZlNgVqs+7mPw0N SmcX0qsx7/xYt9WNaouWPZXc7niEDchd2GZ3jhKeEdKMf1WcBJDr66rJUyLq3XI0Fs+Y mMpR1HC5UxB36/oRACxA7CN35y/Yvz5sSQJ0XDVtmYgspHbdFsOFNTY8Mqf8p6h+CtJY VwVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="TA/0QBUV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 84-20020a630057000000b005b64e8336dfsi975160pga.604.2023.10.31.05.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 05:59:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="TA/0QBUV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 562AE801F740; Tue, 31 Oct 2023 05:59:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344382AbjJaM7z (ORCPT + 33 others); Tue, 31 Oct 2023 08:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344350AbjJaM7y (ORCPT ); Tue, 31 Oct 2023 08:59:54 -0400 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C3B8BD for ; Tue, 31 Oct 2023 05:59:52 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1698757190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IDMC1GkRNk1k2ztG8ptBV6onAW6A2wHvK6RivRZoKp4=; b=TA/0QBUV5tjMBOvNwl6Xn4budzlArLfuW+A79pKt3KCUzJOtkHtRgHxu8TL7vXOaJKHz1T ZpKHEFCLgO1QPpwpXo7cMkcBIg0EP53i/qeh92aagpgaBFQY6PLevvlTAugkvzNPQU74Bb H1krPNOhnQtuF6yR90mC2kXuFHnXPuo= From: Yajun Deng To: mingo@redhat.com, peterz@infradead.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 Cc: linux-kernel@vger.kernel.org, Yajun Deng Subject: [PATCH v3 0/3] Use update_current_exec_runtime simplify code Date: Tue, 31 Oct 2023 20:59:25 +0800 Message-Id: <20231031125928.235685-1-yajun.deng@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT 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_BLOCKED, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 05:59:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781276029403901983 X-GMAIL-MSGID: 1781276029403901983 update_current_exec_runtime would update execution time for each task, we can use update_current_exec_runtime simplify code. The 1st and 2nd patch update update_current_exec_runtime() applies to all callers. The 3rd patch use update_current_exec_runtime simplify update_curr. Yajun Deng (3): sched: Don't account execution time for task group sched: Don't trace stat runtime for task group sched/fair: Simplify update_curr() kernel/sched/deadline.c | 4 +--- kernel/sched/fair.c | 13 +++---------- kernel/sched/rt.c | 5 ++--- kernel/sched/sched.h | 11 +++++++---- kernel/sched/stop_task.c | 2 +- 5 files changed, 14 insertions(+), 21 deletions(-)