Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp462718imw; Fri, 8 Jul 2022 06:11:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s2GOJ2KPjRmnBJK0BMGvaLaM9bZCftAxR8tspzuBmJ5I6Ny6D7cklcMMn3PumWrv8KZFBG X-Received: by 2002:a17:907:d88:b0:72b:1127:33f5 with SMTP id go8-20020a1709070d8800b0072b112733f5mr3590316ejc.725.1657285877770; Fri, 08 Jul 2022 06:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657285877; cv=none; d=google.com; s=arc-20160816; b=lRblrLvuKuohVylUok5s7Hm3Q9UVXTmBbVsUhDVBD0uBeH50rrbmqwy/BxQijOzGwY toe+X88GQyIasvZvUDTVlsvUh+hvRofoMXd2LSer//+GSztgpvuK91UmXSL4B7nA3R63 rfEaJKkMCSi4qC+CVGlMzKOtap/vRyKYen9KeZbULN1NtdCczVOa8mvPv4byfaBebNl/ Qrq2HVK7PMnniUg7LYHS+1i9wMdY/oXS0mZlmrBoQU9h4s6Ad9cBG1h0y1XGQSJCm5MW jHifsywa9nIVH6G47pikw1DiZ49kFp6oXe+r/m+FF/dSP3cbM9vzKI/La448J/Yhsbe6 TLXg== 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; bh=lGVfs8klvqekLkpSQWMKv+aB/PYP+Kh059eW/nEshPM=; b=T2xxwrg6e2G//5aJwMMv7bLbkfH8OKmEXLHWsmM7uitw7sQIUSHXxfek0RZSPQHpmn L9KTVZLxXtjU22KVIY7QBT0jn/kmwXPHl2kbJdbmzns/DwQmP9LHf2mYEw/Hbq4pZeK6 b2S56KyHY+QJF7BIM72TgfEYYs2BtmzkjudssVV7NUNBfcYUhCVJnvy8i+YRhoiHr+gh b7p8cSYnxGpikAwTS9QNpuP3YHVylmfS/vh5jIUT6oACi54TBVib5iDzD5a+Xr1wpYb7 UY012oajqGR2+28q/EAQ9TkYDFz1RY9eB+PKYIusnKfoqW/U5lLcFyXiwYJoUePyUpxw 6A2Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs16-20020a0564020c5000b0043a5295ac89si5617725edb.80.2022.07.08.06.10.49; Fri, 08 Jul 2022 06:11:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238047AbiGHMej (ORCPT + 99 others); Fri, 8 Jul 2022 08:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237735AbiGHMei (ORCPT ); Fri, 8 Jul 2022 08:34:38 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8384D76948 for ; Fri, 8 Jul 2022 05:34:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A4141D6E; Fri, 8 Jul 2022 05:34:37 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0A303F70D; Fri, 8 Jul 2022 05:34:35 -0700 (PDT) Message-ID: Date: Fri, 8 Jul 2022 14:34:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 3/3] sched/deadline: Use sched_dl_entity's dl_density in dl_task_fits_capacity() Content-Language: en-US To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Valentin Schneider , Mel Gorman , Ben Segall , Luca Abeni , linux-kernel@vger.kernel.org References: <20220629122053.287165-1-dietmar.eggemann@arm.com> <20220629122053.287165-4-dietmar.eggemann@arm.com> From: Dietmar Eggemann In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 On 06/07/2022 12:47, Vincent Guittot wrote: > On Wed, 29 Jun 2022 at 14:21, Dietmar Eggemann wrote: [...] >> static inline bool dl_task_fits_capacity(struct task_struct *p, int cpu) >> { >> unsigned long cap = arch_scale_cpu_capacity(cpu); >> >> - return cap_scale(p->dl.dl_deadline, cap) >= p->dl.dl_runtime; >> + return cap >= p->dl.dl_density >> SCHED_CAPACITY_SHIFT; > > There is no direct relation between BW_SHIFT and SCHED_CAPACITY_SHIFT > and we can change one without modifying the other. > > Should you use (BW_SHIFT-SCHED_CAPACITY_SHIFT) instead of SCHED_CAPACITY_SHIFT ? Yes, that's better, similar to cpu_bw_dl(). Thanks! [...]