From patchwork Sat Nov 4 09:00:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yiwei Lin X-Patchwork-Id: 16249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1540753vqu; Sat, 4 Nov 2023 02:01:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1lBEwx0S/YbIKoApL9yZtiZMD/B6c9MK0dPH2e++u+RJo7+CP0KTJMnvLvC9RTaCE7YkL X-Received: by 2002:a05:6808:13d4:b0:3af:9330:9494 with SMTP id d20-20020a05680813d400b003af93309494mr33815499oiw.32.1699088494909; Sat, 04 Nov 2023 02:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699088494; cv=none; d=google.com; s=arc-20160816; b=Dv3yAE7UQfuDzyEpAVO3nTbIRuLJZn5JkgCXB7bMnY7Iu+m4VMYVPCwgFptL68AcK7 vDDBR13wCFhMQk1se6sXDaxIkNS7FJbn4H9LL+vx0fnsuPYF9TkJjOAQ+pkMBb8oBvqG lw1UlOKfwt4A4X5CiNvUh3R936GGcXxVz/+1I8mIrpJbg0KHae4twGeBq5R/lwnbfjmu qxVqZzsKGT+7+ETPm+XBC+2qSkYFSuqYsDJ+Y1NK6rj0SRdo7dMWbod/lXLZ3SqB09yT FCpPGTCAzoHtnvEXX9oZA3c4w4QDEX/uJbJCCkyPSgy1S+B4XwX2D+C0bOwIkJqapduD 2CGA== 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=Xhoss6COa2UBytJz6Pi1nWe06LTBBnpCq5bWg5P1Vw4=; fh=pAuPqVSinHxDAvipZztJ2JJosl7fW9KjSntKw2HBe7o=; b=s1JSWQGZINzba34ZDpCwD/4HhXufUdwDH8m1R53/bJzFGeegjkWXw6MthqeHHbn6pf lJ4cgeZNDuD7tf1dfrGeHt8afxNJ+PVt06roRVNLN5RuJQyztdy5lOsOvmBAB0nvRm34 z3WldlyCjdV0/vp0qSvXO5XQsZov+1a/bwiRx2lhhRXUteYoo35pGiY4z+KTFNPFMdA2 vWRQsEt1XyN0svWQR9BZ+vELTqFxstiGY8RBt2kj86gA/VKbpdE7c4Q3YPH1xCfTOsns VBQgc0e5ASdpxpmFy7nw5mXL8Pmdcty7pCgiJ5AKpoFaLlhry9KRGWHaMj3cIXaE66Gp /Sew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j3acVPP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x22-20020a05680801d600b003ae067122aasi1326782oic.126.2023.11.04.02.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 02:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j3acVPP3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1EB9F8053C4B; Sat, 4 Nov 2023 02:01:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjKDJBV (ORCPT + 35 others); Sat, 4 Nov 2023 05:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjKDJBV (ORCPT ); Sat, 4 Nov 2023 05:01:21 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C512D42 for ; Sat, 4 Nov 2023 02:01:18 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-da2b9211dc0so2829333276.3 for ; Sat, 04 Nov 2023 02:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699088477; x=1699693277; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Xhoss6COa2UBytJz6Pi1nWe06LTBBnpCq5bWg5P1Vw4=; b=j3acVPP3IJnVmD10f43IguL3O/aAB3Rv4XGtjtaGgtdNuvS8MdlvDN8I6sesOjBPQs vTXf7bRmnPp0dnvncjVSC1d2dNGt30rlDe4KT/agrz0hBVq2UiHuHyhHX7H6Xy3zoUgL M2RffYH8CQGnmY9f6DHy2BcnBKnMcsTu7XYtxP2HAgVEVPA/o8xtVnkDp5AuvoZWSgjj nKcaF55do+QIb3A+frIP/6hobwI720srcLKHGw8aK7/MKw90GEmclPGDjOpoNLRmefGn H9hFFn1k//p4+RoKcCBvY16c4jty1/EIYJnuui8ykeB1oH+tQx21Rliv+iPOtFlZ569a hS8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699088477; x=1699693277; 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=Xhoss6COa2UBytJz6Pi1nWe06LTBBnpCq5bWg5P1Vw4=; b=RblVMWMAXlthzRCWq/pFQGudzgzB1rjfWPqJBBxHCKViNn2tb69Xil5zRJQWPnle4Z YBomJRjvQwB6tqk+pCqvbbYuM/zqvuSJRO7GFgw4o+5y7ImilB38mQTRFBEZLJPlnj/6 t7G56jGhdvVMiEyRXIdaxCzwhbG9YDYfiZke++P12ADh8B3A+TmoD2zC5iGrcBQP1mQr TEDi7X8ir41+dibCXOwBx/Z6TgWlJQop5HlkjxoS3QL7ygRswFJHlpHX2qvlx6O7hVSw xv3beuNm/NLHHTjBNiBBswYzWT8tYvc+aE0KmBwhkxN0i8XajH1EJx4xjmms0L8OYnOp /Rmw== X-Gm-Message-State: AOJu0Yy5TtU6HetQOd4X+FX5yR47L4l3tb3TFVM1i8rRR/R/pS0pHUOO +qXRZ5jFLD5QBRO6Rhbef2Y= X-Received: by 2002:a25:d51:0:b0:d7e:b88b:1de8 with SMTP id 78-20020a250d51000000b00d7eb88b1de8mr21549450ybn.9.1699088477544; Sat, 04 Nov 2023 02:01:17 -0700 (PDT) Received: from rin-ROG-STRIX-G10CES-G10CES.. (111-255-201-13.dynamic-ip.hinet.net. [111.255.201.13]) by smtp.gmail.com with ESMTPSA id b7-20020a62cf07000000b0068842ebfd10sm2667596pfg.160.2023.11.04.02.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 02:01:17 -0700 (PDT) From: Yiwei Lin To: mingo@redhat.com, peterz@infradead.org Cc: vincent.guittot@linaro.org, dietmar.eggemann@arm.com, wuyun.abel@bytedance.com, linux-kernel@vger.kernel.org, s921975628@gmail.com Subject: [PATCH v4 0/1] sched/fair: Track current se's EEVDF parameters Date: Sat, 4 Nov 2023 17:00:53 +0800 Message-Id: <20231104090054.124945-1-s921975628@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 04 Nov 2023 02:01:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781623417835650104 X-GMAIL-MSGID: 1781623417835650104 I'm sorry that there was an obvious error in the previous submissions that caused EEVDF to always be unable to find the eligible se...... This patch should address those issues. Changelog: v3 -> v4: - Fix incorrect changes which make EEVDF picks the first entity instead of the eligible one v2 -> v3: - Simplify how we avg_vruntime_add() and avg_vruntime_sub() when neeed - Do not avg_vruntime_add() the contributions of 'curr' again when put_prev_entity() v1 -> v2: - Consider the contribution to avg_vruntime for 'curr' kernel/sched/fair.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-)