Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4745922yba; Wed, 8 May 2019 01:58:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5fRyzTI4jLcmM6RwiI/rl4+r1/Xey6jqsBr9mx/v7vadmmHwFdeeF4L7C4iz+3R4QUPwc X-Received: by 2002:a62:1d83:: with SMTP id d125mr46167511pfd.74.1557305880678; Wed, 08 May 2019 01:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557305880; cv=none; d=google.com; s=arc-20160816; b=R279wdMQtrzmvvSu7WQgEcCjx4lXDUfZiL6sm4FS56Yt9bqJuhgHdLgwxJolx5Of6s yikOsYqBnZs3wuaZlfas7F/QLP1CRRzztWXtVIGVYZ1EeE1M7TxzckJFbYNXdVZJuVvO NZOyc8vBJQmvPRDCDWHc6cl8FL6JMWWDdTjkdz+ET6LM+0WocYTyjF6Z0HL41T38J5ma EEA+NBquYrPrTeuOq/7NI/LbQNap45CqAyMH1reZdods8FIFw20I13lwbYQ/B2iXMbhE vzj4rX01NZOd8mTI7aYFA2PEjGx1FpyR9GH6sn43CeYM3714YSorQUJYKRDUmsr1gpC/ qA2A== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=cTOhLIbO7zWPuEc5o4kyxjFgfJs1RxOrQesYsVrYlfQ=; b=ulr5GTHRBRhsq5Co/OZ4l1tQ9Axatz+XZFfRMxhO88odKolYaNcLE0/buZ75/Jk1Qg R5893ymCq9cIKa5wiDMvK95o06Buxsn4wab2Wv2vCsIhmSjyjan2PRm3/WMYBImTtwDC lkeEvyc3JM2GoeTZTTM3/q2av+k4ygdB3Hxjr0T0tWX3jrvvdYQZzkoTyGUcwpH/lA82 DT9Xyj4TwGag5joeYgdbDIrHkL+OlUkYWX+VufbkYJsX/CGWI0nxqxHxHeRKNkxqgEfb T/iVqGptbdwfyd5IMZKwNr9wkCUvB2wt8s+k/hpJc4LKRUSYXyQ5upRVSIF8NB65puS1 53WQ== 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 k3si23722245pgm.264.2019.05.08.01.57.45; Wed, 08 May 2019 01:58:00 -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 S1727092AbfEHIOY (ORCPT + 99 others); Wed, 8 May 2019 04:14:24 -0400 Received: from mail.sssup.it ([193.205.80.98]:59616 "EHLO mail.santannapisa.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfEHIOX (ORCPT ); Wed, 8 May 2019 04:14:23 -0400 Received: from [83.43.182.198] (account l.abeni@santannapisa.it HELO nowhere) by santannapisa.it (CommuniGate Pro SMTP 6.1.11) with ESMTPSA id 138918671; Wed, 08 May 2019 10:14:21 +0200 Date: Wed, 8 May 2019 10:14:14 +0200 From: luca abeni To: Juri Lelli Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" , Ingo Molnar , Peter Zijlstra , Vincent Guittot , "Paul E . McKenney" , Joel Fernandes , Quentin Perret , Luc Van Oostenryck , Morten Rasmussen , Daniel Bristot de Oliveira , Patrick Bellasi , Tommaso Cucinotta Subject: Re: [RFC PATCH 3/6] sched/dl: Try better placement even for deadline tasks that do not block Message-ID: <20190508101414.1c968810@nowhere> In-Reply-To: <20190508080116.GE6551@localhost.localdomain> References: <20190506044836.2914-1-luca.abeni@santannapisa.it> <20190506044836.2914-4-luca.abeni@santannapisa.it> <20190508080116.GE6551@localhost.localdomain> Organization: Scuola Superiore S.Anna X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Juri, On Wed, 8 May 2019 10:01:16 +0200 Juri Lelli wrote: > Hi Luca, > > On 06/05/19 06:48, Luca Abeni wrote: > > From: luca abeni > > > > Currently, the scheduler tries to find a proper placement for > > SCHED_DEADLINE tasks when they are pushed out of a core or when > > they wake up. Hence, if there is a single SCHED_DEADLINE task > > that never blocks and wakes up, such a task is never migrated to > > an appropriate CPU core, but continues to execute on its original > > core. > > > > This commit addresses the issue by trying to migrate a > > SCHED_DEADLINE task (searching for an appropriate CPU core) the > > first time it is throttled. > > Why we failed to put the task on a CPU with enough (max) capacity > right after it passed admission control? The very first time the task > was scheduled I mean. I think the currently executing task cannot be pushed out of a CPU/core, right? So, if a task switches from SCHED_OTHER to SCHED_DEADLINE while it is executing on a fast core, the only way to migrate it would be to preempt it (by using the stop_sched_class, I think), no? (the typical situation here is a "cpu hog" task that switches from SCHED_OTHER to SCHED_DEADLINE, and it is the only SCHED_DEADLINE task... The task never blocks, so push/pull functions are never invoked) Or am I missing something? Thanks, Luca