Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7193306ybi; Mon, 22 Jul 2019 08:38:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJItVRRtmNx3vJbEHuKe+woWaFEJ7oMetY3ZvKJry/9z3IP3jOlIXdWHs2r7irzZ/twNxa X-Received: by 2002:a17:902:7202:: with SMTP id ba2mr77066838plb.266.1563809915047; Mon, 22 Jul 2019 08:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563809915; cv=none; d=google.com; s=arc-20160816; b=sa5tKBVIaaa9H0UO6qGlIU41yS3szmn1vR9knqlzHnc8kL3Q3V1/rMwZ1XBOp5qB8O RPqnINbd0yYKJSNLL6/seuoSQuS8LqO4lSvSn5IJW/AT3Yow/TL4L/yMgHcnuy7k72OI Kbw9p0ijSmCSLk1R0B67zmJzmJwPWNbYA19JZERAcjYYZE3HPGouayEpAEvrwYn71fmF XJsc5gJuH6ec+hNwHDcP+FAGYhSbZcsQeUtUrx7jHRYqFhaP1UxQpF21LU/8POIHHsfM ZU9i+JYtrB6LXEsj1x1uuoVCcBsV1mlJH0arDF8k35McA0K3wKTwLBATN+W8hc7Xt6hG xoPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=l6/eI+1bfxhgnjF0+OZA0BlRzZcPL9vx2FzAtVqZorc=; b=nPniAUoEyJIin1cUl7sWI8/s5bfpdnXW//I14srTvXY7LTS+uymV7MUzYv/0MpV7eM 8MvjTwyYqNv4WUKuBdwL4B/6sswh1eynBJ9pdeWJNU8Va6QVm2OAhgSJlAOoDLCilwEy YmErr2IPwVDOaCXQz7etwYITtn7TXfYN+1kPKbY7NwyrZLWvpnHxjib7cY08lSguWEx9 83wyd+SfMyL3sc+Bx4lSNKXzV9HrEgxq8e56lDwLyJRq3mP3k/E9RSTmIb4VM91kPodE ym9xuwhqKb7lp0H0HUxTELQZPjQ8B1iWDD4nJnsYi0Aa5KFUkNT8XWHqKEwJ2Xf+ptZE XUgg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si38202385plm.390.2019.07.22.08.38.19; Mon, 22 Jul 2019 08:38:35 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729410AbfGVM2e (ORCPT + 99 others); Mon, 22 Jul 2019 08:28:34 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50502 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729075AbfGVM2d (ORCPT ); Mon, 22 Jul 2019 08:28:33 -0400 Received: by mail-wm1-f67.google.com with SMTP id v15so35001901wml.0 for ; Mon, 22 Jul 2019 05:28:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=l6/eI+1bfxhgnjF0+OZA0BlRzZcPL9vx2FzAtVqZorc=; b=p8HZHP5ed3h2csJPlM746p0vjLQ682PX/pU4+qqZMqihui8rg3UOuFccyl87xrgICo g1heMd+uj3Pa2Mf6gYmsM8L5zZCVIdCXDfnh/btx/QtUiUeqVUDop1cxETcMt5xCy2+P Zgh8bxRxbqXAQ28TZpuPawgvsjGj2GFVU4s0JMON9kQBcLXMJJ79jjjl3IGCv0Y7cNZj nWJPh3GIZt3au0/jRCiEHBZAD+pmRblzFJS9L5kwCyVF8UH+5yGqW3UWw1H5Dcx+lbdK lMIPLnDwtfdbkCZeORDvmPf52/kPpPXqicqlURRJit54DRw4c8vOEM//DCRUPkIvMXHN t3aA== X-Gm-Message-State: APjAAAXIGPaxbrkVMMCtIo7ae2PxyMHmekD8/2IZjEjr6EdMaGrEUdO6 b0pp4bL1bvuIDnb1OSIzlNFVpA== X-Received: by 2002:a1c:5602:: with SMTP id k2mr59725677wmb.173.1563798511297; Mon, 22 Jul 2019 05:28:31 -0700 (PDT) Received: from localhost.localdomain ([151.15.230.231]) by smtp.gmail.com with ESMTPSA id w25sm37202326wmk.18.2019.07.22.05.28.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 05:28:30 -0700 (PDT) Date: Mon, 22 Jul 2019 14:28:28 +0200 From: Juri Lelli To: Dietmar Eggemann Cc: peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org, tj@kernel.org, linux-kernel@vger.kernel.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, lizefan@huawei.com, longman@redhat.com, cgroups@vger.kernel.org Subject: Re: [PATCH v9 4/8] sched/deadline: Fix bandwidth accounting at all levels after offline migration Message-ID: <20190722122828.GG25636@localhost.localdomain> References: <20190719140000.31694-1-juri.lelli@redhat.com> <20190719140000.31694-5-juri.lelli@redhat.com> <5da6abab-00ff-9bb4-f24b-0bf5dfcd4c35@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5da6abab-00ff-9bb4-f24b-0bf5dfcd4c35@arm.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/07/19 13:07, Dietmar Eggemann wrote: > On 7/19/19 3:59 PM, Juri Lelli wrote: > > [...] > > > @@ -557,6 +558,38 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p > > double_lock_balance(rq, later_rq); > > } > > > > + if (p->dl.dl_non_contending || p->dl.dl_throttled) { > > + /* > > + * Inactive timer is armed (or callback is running, but > > + * waiting for us to release rq locks). In any case, when it > > + * will file (or continue), it will see running_bw of this > > s/file/fire ? Yep. > > + * task migrated to later_rq (and correctly handle it). > > Is this because of dl_task_timer()->enqueue_task_dl()->task_contending() > setting dl_se->dl_non_contending = 0 ? No, this is related to inactive_task_timer() callback. Since the task is migrated (by this function calling set_task_cpu()) because a CPU hotplug operation happened, we need to reflect this w.r.t. running_bw, or inactive_task_timer() might sub from the new CPU and cause running_bw to underflow. Thanks, Juri