Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2102487yba; Sun, 5 May 2019 22:52:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/DXG7z22qCWWBT8igLtKgk6JnJ5krzQxUhT2n2uZ8jj8lQ5pH8eb3egEgg40878MqVls9 X-Received: by 2002:a17:902:e393:: with SMTP id ch19mr5821403plb.300.1557121932557; Sun, 05 May 2019 22:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557121932; cv=none; d=google.com; s=arc-20160816; b=PmAxxuWI6WE9Z3ZAtcriQaUttsXEpCkOtN3ER4SrsQHTGMgZcWBmQ/TelirfduCspp +GD0hwlNoegu+LotL3EMWe1PSBtsY75AcfQUKq3VbXwGbgW0RuJngyDp4XOL6zq7T6cQ 0eCLkxIhFBSyGLzIWfsr62THGXwxbmnEw6lxdSz/YKV1k/zSUoE64jp21r7XOmDSByUY 79XgzlviMaGLp7yPZWgQ9ld9QEQscNyfiHP/NBPPJxTnquS0kDRrOsU6uXTRWaPshpsN 0o01r9s+zb6wc6naniCZY2GLmKAPBA42BEbTQfh1DrpOv7iX7tI4phUVJWCp4/txYc1h MGPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=2n/a2y98a+FywQAkpcz0G6xG3wnkxZ9839j74Fd9gPM=; b=Dp/IatYIZW9zuxyQORYSPx9bhSuoasLNlyEM+Zhfya15niw2IKJAwpKWYPI+ArAGmP VqJb4bThi9ThBu0+uCUnm5Ad3fQEJ/IPwzm7u5Xm3CZsPgGNDiXETDGo81EEFu2kfYcA iL4TiKlqJn0MDFmzcpbluev0Kgfm8QC7MYutAuT3pCz0746rpFkyFEtVSkqu4pXbppmc iO3Hj6yvHOeskInY1espmCTYxfEmxr7v9jQsCUt6YFwsilMJ5cjXiKNbMWDTq5HgEa18 99LixwnQxnIQa5DJjB1BjKcKSOP+GUXKjz33IGJJUooCJ7va+reVM98VF02QQFXoSbJV Vjpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si14388737plv.102.2019.05.05.22.51.24; Sun, 05 May 2019 22:52:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725864AbfEFFs5 (ORCPT + 99 others); Mon, 6 May 2019 01:48:57 -0400 Received: from ms01.santannapisa.it ([193.205.80.98]:57922 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbfEFFs5 (ORCPT ); Mon, 6 May 2019 01:48:57 -0400 X-Greylist: delayed 3600 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 May 2019 01:48:55 EDT Received: from [151.41.47.232] (account l.abeni@santannapisa.it HELO sweethome.home-life.hub) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 138841006; Mon, 06 May 2019 06:48:53 +0200 From: Luca Abeni To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , Ingo Molnar , Peter Zijlstra , Vincent Guittot , "Paul E . McKenney" , Joel Fernandes , Quentin Perret , Luc Van Oostenryck , Morten Rasmussen , Juri Lelli , Daniel Bristot de Oliveira , Patrick Bellasi , Tommaso Cucinotta , luca abeni Subject: [RFC PATCH 0/6] Capacity awareness for SCHED_DEADLINE Date: Mon, 6 May 2019 06:48:30 +0200 Message-Id: <20190506044836.2914-1-luca.abeni@santannapisa.it> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: luca abeni The SCHED_DEADLINE scheduling policy currently has some issues with asymmetric CPU capacity architectures (such as ARM big.LITTLE). In particular, the admission control mechanism does not work correctly (because it considers all cores to have the same speed of the fastest core), and the scheduler does not consider the cores' speed when migrating tasks. This patchset fixes the issues by explicitly considering the cores' capacities in the admission control mechanism and in tasks' migration. In particular, the scheduler is improved so that "heavyweight tasks" (processes or threads having a runtime that on LITTLE cores becomes larger than the relative deadline) are scheduled on big cores. This allows respecting deadlines that are missed by the current scheduler. Moreover, the migration logic is modified so that "lightweight tasks" (processes or threads having a runtime that on LITTLE cores is still smaller than the relative deadline) are scheduled on LITTLE cores when possible. This allows saving some energy without missing deadlines. luca abeni (6): sched/dl: Improve deadline admission control for asymmetric CPU capacities sched/dl: Capacity-aware migrations sched/dl: Try better placement even for deadline tasks that do not block sched/dl: Improve capacity-aware wakeup sched/dl: If the task does not fit anywhere, select the fastest core sched/dl: Try not to select a too fast core drivers/base/arch_topology.c | 1 + include/linux/sched.h | 1 + include/linux/sched/topology.h | 3 ++ kernel/sched/core.c | 2 + kernel/sched/cpudeadline.c | 53 ++++++++++++++++++++++-- kernel/sched/deadline.c | 76 ++++++++++++++++++++++++++++------ kernel/sched/sched.h | 16 +++++-- kernel/sched/topology.c | 9 ++++ 8 files changed, 143 insertions(+), 18 deletions(-) -- 2.20.1