Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp379959rdb; Thu, 2 Nov 2023 06:31:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7e11PIIoLOD5MS2ABnzyG+beWVN0YiTwIrcB+dkf8NrjgN5WMPzsj8dM6Sz78t6T7Kwrj X-Received: by 2002:a17:90a:ca13:b0:27f:fce3:2266 with SMTP id x19-20020a17090aca1300b0027ffce32266mr16394681pjt.24.1698931897951; Thu, 02 Nov 2023 06:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698931897; cv=none; d=google.com; s=arc-20160816; b=K1Lpd99KpgMazG898W1LWXJqDZxy5kskkZztBabhuWJsNw2AwuHJze+lzT9GTCkh87 abTfWYPrLX6H0bs4IpM+QZANUPXM1NK8Uv4Mevtp5nc+hSb/8zrrohwmU48JYVpQni3v 9jjGPS0Q1W35Oc6ojeMTsXYhVlOAA8Fq26zwrEdtbDrtAFpyOa9COWJFWoE96qb23voo jtWrJWyu0lOlp1G3+Gz5xb5/XfKGjL8oRt2IvQma/HBr/ZdVZOnc5Uk9pt7N4wY8M+mm RovYDAD4cFncAC4klLdZiMvtWe2n1KZfC7AJFvb6ph4f/rD+OF41TnEABIPagVvFudY0 IhZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TOkLeZ1O4q/pINlkEKARqNQtmFQ8WPpDSAmLPInWj7A=; fh=Z+3CBwCYp81O/06+oTDXifwF94DHLuSNw9vDIkYL3vo=; b=c7vgRT2Kp5Lmec2W3U5BXvIxOFQ9xNnc3UIMfFtDttUqpcMDyRxSgUisSIhzHvw33n nRkM5JHiOv4LkDQi5vnBYbOvx3gozT4oKXTwnMvuW0AKKegMkg8on3nTsQNgTWkvar/t +3cKRzWGqREDZeAEMcHgK9kJITzgJldYKBVK40fXcCreRBZA2dxk3co/Yn+WlFp9MOec LbQ2BzQb3XEJ8jo3pjVCcYNhtfy7H8fqtbSByOOgwBRn7BZ2hBYlavwTngv6H9AKnEGh xKruGdu51BkHKegrPYhlwvo/ETKuEoFFungzmUWfsOrH6RF7PUZAuGJGld9Fcezoor9d avQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YK0ZQAhy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id pi3-20020a17090b1e4300b0028014e223f9si3001782pjb.81.2023.11.02.06.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 06:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YK0ZQAhy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 50958807328D; Thu, 2 Nov 2023 06:31:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347476AbjKBNbY (ORCPT + 99 others); Thu, 2 Nov 2023 09:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234984AbjKBNbW (ORCPT ); Thu, 2 Nov 2023 09:31:22 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E71F819D for ; Thu, 2 Nov 2023 06:31:19 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5b92b852390so710266a12.2 for ; Thu, 02 Nov 2023 06:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698931879; x=1699536679; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TOkLeZ1O4q/pINlkEKARqNQtmFQ8WPpDSAmLPInWj7A=; b=YK0ZQAhyux2rezDHcNwHTSZMAJoz+2mN/36FZBjdKEuvKLqmP7uQc3Kju+F6YxOnyy r4al0vCFbZ4W2fLPC0gZclxtoEQ1f+XVD/hsPXoZRIc6qZPXn5aOH6m4PpGRa75oASh1 BlhdYKzCrc2HYQ/wquyZbbzo+8sw5Zyn1t9EGfRxv5oj2SSejK/8289GtzlHVlxJr1oO RCVfECSCTWn1xbcxkfVSBl4/nJJykHnrj+Z0H3VgHMMD+tWFcpLeMveT16HPS1kPl9RV me6jFfH+Uurks2/Vc1wyIoSmhKH5kvxpGEtlFCkhwyYB7GjwajAxO4/65ZzkBJFjmD1i lxBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698931879; x=1699536679; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TOkLeZ1O4q/pINlkEKARqNQtmFQ8WPpDSAmLPInWj7A=; b=AC4XsO19TSqS2bwLTm5VI7j9/638rpEbDHXC0XWFBmEzUfYizrXYj5tcVkKK59om8t qiHWyvg/PGESik3FdHoA0Fxj2V9NBZnmBI5rI5iOxQe8V/uAGTUhPADZAhykxAM2QLI5 gIgFWbBlc5QOrM/1uEjHJUSJrBj2kx0bKf5uGsJERgFrtnkD0JuubxjEYFrUN56gk+oQ np/NddBLqW4ksRYNB4ZQijg9DG+JDj7bgPzMD9EQLfVBOItuEntsa/KsTepBbHBfTZYQ /0XNTP1xn8gGuMH9UanizowqZZN+j1ZCORjssDzDpmD87dWqxvHzJaDoD1Ig8NdnDqrZ GRxg== X-Gm-Message-State: AOJu0YxpuIYi+UUU4nFTFKtfPYDu7/IGimvqK8zMBOfTn0kcBfdkvcmF yl+o+J/uWnQ66vxsY8ObQjk= X-Received: by 2002:a17:90b:1e07:b0:280:5b33:d30 with SMTP id pg7-20020a17090b1e0700b002805b330d30mr11151542pjb.44.1698931879024; Thu, 02 Nov 2023 06:31:19 -0700 (PDT) Received: from [192.168.1.105] (111-255-201-13.dynamic-ip.hinet.net. [111.255.201.13]) by smtp.gmail.com with ESMTPSA id gk11-20020a17090b118b00b0027d0de51454sm2484308pjb.19.2023.11.02.06.31.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 06:31:18 -0700 (PDT) Message-ID: <7537e534-9616-4f45-9974-399453aee276@gmail.com> Date: Thu, 2 Nov 2023 21:31:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sched/fair: Track current se's EEVDF parameters Content-Language: en-US To: Abel Wu , mingo@redhat.com, peterz@infradead.org Cc: vincent.guittot@linaro.org, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org References: <20231101174446.90413-1-s921975628@gmail.com> From: Yiwei Lin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 06:31:34 -0700 (PDT) On 11/2/23 14:27, Abel Wu wrote: > On 11/2/23 1:44 AM, s921975628@gmail.com Wrote: >> From: Yiwei Lin >> >> After dequeuing the current-picked scheduling entity with >> `__dequeue_entity`, its contribution to the EEVDF parameters >> cfs_rq->avg_vruntime and cfs_rq->avg_load are also removed. >> Because these should in fact be considered for the EEVDF algorithm, >> we took curr as the special case and inserted back the contributions >> when requests for cfs_rq->avg_vruntime and cfs_rq->avg_load. > > Being 'curr' means its vruntime is increasing, so does its > contribution to avg_vruntime. And you failed to explain the > most important part that how to commit its contribution to > avg_vruntime (specifically in update_curr()). > > Regards, >     Abel Thanks for pointing out the missing part.  I should remember to commit back the latest contribution at `update_curr()`. In other words, adding delta * scale_load_down(curr->load.weight) to avg_vruntime. Thanks,     Yiwei Lin