Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27975571rwd; Tue, 4 Jul 2023 10:35:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlE3r5uO8P/tLMsdBLKdUtyAx8lrvcslmS3BEkUyCWUZzvOGbHRbE5yBXtxL/u85IOOBUrm9 X-Received: by 2002:a17:903:22c7:b0:1b8:9bd5:8fdb with SMTP id y7-20020a17090322c700b001b89bd58fdbmr4254360plg.50.1688492148992; Tue, 04 Jul 2023 10:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688492148; cv=none; d=google.com; s=arc-20160816; b=LsLESmh7AdRs8uuL5BF8xiESo6JVd3BSM+tQa/G990b8BWAUkvVtsTaOrjQ4dRLHCH GNsRsRWe4lKCVNaEQpWw7UKoXlqyJ46h9IYnFoxyHqMWK9rMWhJbDU1tbP+MBYBC1g5t mkEnAKEPMeRKTx7Z5ct3SC1qXF56nkKJ3Yb6ajlVNn9H9rfACkf6r85HhXaEraeuM3WG gRD/X1gbmduqxyrWum/7Oaj/e3+ZKpBmvPpATPUcW6aFL205ccXRAPdHo7VtwoVAbb9y 0CJG0Ni8Xjg9T8AauIRR7eW9f1zwBvK11oWP8lrdrRAADCUCEGiTfYzKqCVXsfzbEaZE 443A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=J3DzlEIK3VQkSx1rkZscROCQHkagDt9CFs2s1aPNi+0=; fh=3DHAwFBszDSGaB8pGYuAC+VNGlDHmszqq2JjcW50FPE=; b=yICp5UItJYmqdR9jp+SPrc0kPoLWWm3xh2TvpayF5Ag4ISxA0RkbSPOhnsrMRLOWFQ /HP/R9vrv6UUwv5OluBrZWLCfUVM9WKYcgWKaM/giRR7bmvrRlQsZt3Ia6SRRARPHJ2w VmltNCwpM91sBzH26FKVu3KypyPbHb3eJ2U+sh0l53PSx9qLeOcg1iudyrEfUS80Ipa/ cjmay55dVXuaSlPg3C8jCGuu/76eXwsvZf2u0hDedxbghTcwLTuQFRNPemz4fgijPOOO Hylu+op/y9yWd5F8dYVRK/fFYH6mNNjDByqtbEK/SC1G5NCAjAafXt42gKzry9XH2DN9 DlkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b="W/f0Rbbp"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t10-20020a17090340ca00b001b845157b69si13013465pld.414.2023.07.04.10.35.35; Tue, 04 Jul 2023 10:35:48 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b="W/f0Rbbp"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbjGDR0F (ORCPT + 99 others); Tue, 4 Jul 2023 13:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjGDR0E (ORCPT ); Tue, 4 Jul 2023 13:26:04 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07141E76 for ; Tue, 4 Jul 2023 10:26:03 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b6f9edac8dso11985651fa.3 for ; Tue, 04 Jul 2023 10:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1688491561; x=1691083561; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=J3DzlEIK3VQkSx1rkZscROCQHkagDt9CFs2s1aPNi+0=; b=W/f0RbbpH373Lb+jlIoNdUX3QZVvg8+fGkg2qvftQAAvT081nnSdrFcLsu/yhaxXpe LoPUEEEmpt1G1K/stHKPYB2RNf0Wl7RmpRJ2YSl02YZIyAK8pm0kHSGVaGb1m5U/gHVD 6Azp6nit/ZXFQafN4vCI5knjK+9Rw6dq7lrRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688491561; x=1691083561; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J3DzlEIK3VQkSx1rkZscROCQHkagDt9CFs2s1aPNi+0=; b=K5RYX6Sb6Todo3NbqXlzxN8zhajshNpDqCYm54yRJE52cWvPt40SFlHkM8R1ta5qsy OP+47MSTG6Lf1fboH3kjybehcnTbeIr97uin7+5kLeRMJ9JXikFzNbHdbYFyvk6i9s4n hyyMpuv6KJopXcK+X+UYKz4NJX1kZtFWd90m3ZjMhlYaKA7f4Uuyfxe72BFDG9IpABwX kzumQ5Di85MndzuWnNxkAILrWtPsFdroeZVngHZy7XFSlIKUdOWx8LohgQUGlo4epWEf YjQv+x4KVIgPyxSqreXu1kzjtgRn1XD1Z14ZhaA/KNOBWtWYyhDPjY7fU+1tPs9wGH68 Ywqg== X-Gm-Message-State: ABy/qLaRgKroo4Fh3hLn4zffMqeZue3fq+vv8NltftAZfb/pRf09c/eI uwLe5eFQMRMclOXyRAm/yNdT+gcl5Y5aTjX4rBQYqw== X-Received: by 2002:a05:651c:105a:b0:2b6:d8d4:f871 with SMTP id x26-20020a05651c105a00b002b6d8d4f871mr6704935ljm.40.1688491560875; Tue, 04 Jul 2023 10:26:00 -0700 (PDT) MIME-Version: 1.0 References: <70837b44-4d21-9d70-d13b-2b6168fd02e3@redhat.com> In-Reply-To: <70837b44-4d21-9d70-d13b-2b6168fd02e3@redhat.com> From: Joel Fernandes Date: Tue, 4 Jul 2023 13:25:49 -0400 Message-ID: Subject: Re: [RFC PATCH V3 4/6] sched/deadline: Introduce deadline servers To: Daniel Bristot de Oliveira Cc: Valentin Schneider , Daniel Bristot de Oliveira , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org, Luca Abeni , Tommaso Cucinotta , Thomas Gleixner , Vineeth Pillai , Shuah Khan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, Jul 4, 2023 at 11:52=E2=80=AFAM Daniel Bristot de Oliveira wrote: > > > Back from EOSS... > > On 6/23/23 18:47, Valentin Schneider wrote: > > On 08/06/23 17:58, Daniel Bristot de Oliveira wrote: > >> @@ -2033,9 +2147,20 @@ static struct task_struct *pick_next_task_dl(st= ruct rq *rq) > >> struct task_struct *p; > >> > >> p =3D pick_task_dl(rq); > >> - if (p) > >> + if (!p) > >> + return p; > >> + > >> + /* > >> + * XXX: re-check !dl_server, changed from v2 because of > >> + * pick_next_task_dl change > >> + */ > >> + if (!dl_server(&p->dl)) > >> set_next_task_dl(rq, p, true); > >> > > > > Should this be > > > > if (!p->server) > > > > instead? AFAICT dl_server(&p->dl) can never be true since there's no > > pi_se-like link to the server via the dl_se, only via the task_struct, = and > > the server pick cannot return the server itself (as it's a pure sched_e= ntity). > > makes sense... I will check that in the v4. Makes sense to me too. Since p is either a real DL task or a CFS task, "if (dl_server(&p->dl))" is incorrect. "if (p->server)" is the right check. Optionally, a BUG_ON() as well could be added to make sure the p returned by pick_task_dl() is always false: BUG_ON(dl_server(&p->dl)); thanks, - Joel > > > > >> + /* XXX not quite right */ > >> + if (hrtick_enabled(rq)) > >> + start_hrtick_dl(rq, &p->dl); > >> + > > > > IIUC that got hauled out of set_next_task_dl() to cover the case where = we > > pick the server (+ the server pick) and want to more thoroughly enforce= the > > server's bandwidth. If so, what's the issue with starting the hrtick he= re? > > I think that the commend was added more as a check if it is correct... it= seems it is. > > Thanks Vale! > -- Daniel > > > > >> return p; > >> } > >> > > >