From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757892AbdEODs5 (ORCPT ); Sun, 14 May 2017 23:48:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37758 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbdEODsz (ORCPT ); Sun, 14 May 2017 23:48:55 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 27F4537E72 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=xpang@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 27F4537E72 Reply-To: xlpang@redhat.com Subject: Re: [PATCH v2 2/3] sched/deadline: Throttle the task when missing its deadline References: <1494559929-11462-1-git-send-email-xlpang@redhat.com> <1494559929-11462-2-git-send-email-xlpang@redhat.com> <20170512075724.0167e9cd@nowhere> <59155BED.7090406@redhat.com> <20170512090158.15c94ae8@nowhere> <5915621B.8050606@redhat.com> <20170512225809.7ad9fda3@nowhere> To: luca abeni Cc: Xunlei Pang , linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Ingo Molnar , Steven Rostedt , Daniel Bristot de Oliveira , Luca Abeni From: Xunlei Pang Message-ID: <59192579.8030406@redhat.com> Date: Mon, 15 May 2017 11:50:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20170512225809.7ad9fda3@nowhere> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 15 May 2017 03:48:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/13/2017 at 04:58 AM, luca abeni wrote: > On Fri, 12 May 2017 15:19:55 +0800 > Xunlei Pang wrote: > [...] >>>> "As seen, enforcing that the total utilization is smaller than M >>>> does not guarantee that global EDF schedules the tasks without >>>> missing any deadline (in other words, global EDF is not an optimal >>>> scheduling algorithm). However, a total utilization smaller than M >>>> is enough to guarantee that non real-time tasks are not starved >>>> and that the tardiness of real-time tasks has an upper bound[12] >>>> (as previously noted). Different bounds on the maximum tardiness >>>> experienced by real-time tasks have been developed in various >>>> papers[13,14], but the theoretical result that is important for >>>> SCHED_DEADLINE is that if the total utilization is smaller or equal >>>> than M then the response times of the tasks are limited." >>>> >>>> Do you mean there is some tardiness allowed in theory(global EDF is >>>> not an optimal scheduling algorithm), thus missed deadline is >>>> allowed for global EDF? >>> Right. >>> >>> With the admission test currently used by the kernel (sum of >>> utilizations <= 1), tasks are guaranteed to have a tardiness smaller >>> than a theoretical maximum... But this theoretical maximum can be >>> larger than 0. >>> >>> If you want to strictly respect all of the deadlines, you need a >>> stricter admission test (for example, the one based on WCET_max >>> that is mentioned above). >> Understood. >> >> I think in Patch 3, it is still worthy to add the accounting in >> dl_runtime_exceeded(), to track the dl scheduling tardiness(after all >> tardiness is not a good thing) like: if >> (dl_time_before(dl_se->deadline, rq_clock(rq)) && dl_se->runtime > 0) >> ++dl_se->nr_underrun_sched; >> >> Maybe changing the name to use "nr_underrun_tardy" is better, large >> value does need our attention. What do you think? > I do not know, I never used statistics like these... > > If there are enough people having a good usecase for these statistics, > it might be worth adding them, but I do not know other people's > opinions about this. > Hi Luca, Thanks for the feedback. I think I can defer the statistics patch after Daniel's "sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks", since there will be another underrun case in the fix, let's wait for other's opinions then. Regards, Xunlei