From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933302AbdEKRHI (ORCPT ); Thu, 11 May 2017 13:07:08 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:36303 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbdEKRHG (ORCPT ); Thu, 11 May 2017 13:07:06 -0400 Subject: Re: [PATCH RFC] sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks To: Peter Zijlstra Cc: Ingo Molnar , Xunlei Pang , Juri Lelli , Steven Rostedt , Luca Abeni , Tommaso Cucinotta , Romulo Silva de Oliveira , linux-kernel@vger.kernel.org References: <5c6933890ea6daa3b4edb4983b0c6f094ad3903d.1493045834.git.bristot@redhat.com> <20170504141721.5f6tlayqwyq4cxnw@hirez.programming.kicks-ass.net> <20170504142329.wanerqq5nsmu3blr@hirez.programming.kicks-ass.net> From: Daniel Bristot de Oliveira Message-ID: <9eb70e53-0d8a-94e8-7da4-b577aaafd56e@redhat.com> Date: Thu, 11 May 2017 19:07:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170504142329.wanerqq5nsmu3blr@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2017 04:23 PM, Peter Zijlstra wrote: > On Thu, May 04, 2017 at 04:17:21PM +0200, Peter Zijlstra wrote: >> On Mon, Apr 24, 2017 at 05:18:35PM +0200, Daniel Bristot de Oliveira wrote: >>> +static void >>> +update_dl_revised_wakeup(struct sched_dl_entity *dl_se, struct rq *rq) >>> +{ >>> + u64 density = div64_u64(dl_se->dl_runtime << 20, dl_se->dl_deadline); >>> + u64 laxity = dl_se->deadline - rq_clock(rq); >>> + >>> + BUG_ON(laxity < 0); >> Compiler will make that go away, by virtue of laxity being unsigned. > Also, so we want that to BUG (or even WARN) in a soft RT setting. > Remember, GEDF does not guarantee we make our deadlines. The point is that, a task with laxity < 0 should be throttled before this point by: df8eac8cafce ("sched/deadline: Throttle a constrained deadline task activated after the deadline") Arrive here with (laxity < 0) meas that we skipped that check. >> We use two difference CBS rules: > _different_, clearly I cannot type anymore either ;-) ops... :-) -- Daniel