Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8026985ybn; Tue, 1 Oct 2019 01:55:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsvoJcfl+l+SuYXkcTW4z1ougEFqnUcFPrKvl0VCRVYblXqidlBp5bXDhlaaqzKVOC5LNb X-Received: by 2002:a17:906:b804:: with SMTP id dv4mr17915990ejb.243.1569920136130; Tue, 01 Oct 2019 01:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569920136; cv=none; d=google.com; s=arc-20160816; b=lbiXGftOEJBIy7Dqe7Ibbp6195Q9EVM/50oVFu0bQ82HLkyHuXG66M20lZ0RfpEfnH DK3YuSd7JgFzPFOOHPZeSEepeuGYnz8AJlNHK3+eYunf+WdXGA3/Du4pZ+ps94SEHxS7 DHominXcGom/B7OqgnaGrxpa9O8tsSFNPaU5uiBt6SKGhFhwvKGiwdpEOX9RWDmrvwjb gdKk4JUTTnPMy3vp4tYZHn5T4T6PP85zd3yEZoTSjSzm82UIBcTa+y9G5MSL/eQxQR0I Onw8wem5fEUsCspmYbLFjmtnQn/t3fPSckfhuMUhLgV5BvKxavN2zDvDOBZoLbafzLww Q3Cg== 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=r3xlO7TaHFHwT8jXasdq8AJJ7zol/7iECMT7Y59gYD4=; b=pSNCQCWQ1qsWb0tYsn7FMYkYK7Yzr+aiv9KKaZzDs8HwEEPFuyOto7Em0MSVrTqIbv X5pmkFL/V/N44yORo5VFEMRXPQvzjCtDeM1tGb2FICxMk6K4jX4rBeJGikMQpg4ir2D5 7mLjCyqQIvz+HOwUR4A24QYmvrGPQocNUq/ksOkWT39EmLx0fQ2ZkM+lRaUmF8nSx0Re bKLO/FcNTqX9nC783ORCqcn8XynNpe4QC/Xado4bCQaugtilBtMXmmI8DDYoW5YCYtXw Xf+7TpLKLl5doROmMZip0m1JKOrQgv47kzFudvmrCt/1vSW/xB3e2/zbw65/JGya43i2 fcYw== 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 m10si8578735ejc.337.2019.10.01.01.55.11; Tue, 01 Oct 2019 01:55:36 -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 S1733221AbfJAIwP (ORCPT + 99 others); Tue, 1 Oct 2019 04:52:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59378 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbfJAIwP (ORCPT ); Tue, 1 Oct 2019 04:52:15 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1AB411A1F for ; Tue, 1 Oct 2019 08:52:14 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id o8so1100626wmc.2 for ; Tue, 01 Oct 2019 01:52:14 -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=r3xlO7TaHFHwT8jXasdq8AJJ7zol/7iECMT7Y59gYD4=; b=IstFMBQ0bDN3myWToUKErPQB/JW/V0Vhq91Imifn639PdgUN7WKfQ877vmwer75w42 OsLUu5PqO8WHkfmAesZ22vZBoM59KoWEthdkk/tC5j69ouWZQXZHet2JxZOicxdXbwmS X88wfy+pkWOScjKhFTh2M3OesZf3xus7y9jZoctKt+Vw/DithKyclG3ZVX0QjCtCQg5N crB1myir7q5LUYGhrvJsNelHCUofYckNNn/s9wZgfct9xMCBa9Y3x2ylXsqBjHSEgc7k 2nvjho+Ah1S7kN92qPbgu6Ww8r4Lua5uTcWbZSM5S3z46P7Ay1K+qKnzfbtOnMcEOxFQ Q6NQ== X-Gm-Message-State: APjAAAVUBlKGONUQyUcA7mXqZ5Ey+WW89lrV2GEqv71gzjgHGkbPMoEi yimri/+pSW2YDRYrsSfyC739Qzikf6DtHi2Nf0am70qqno9FvcckPS59TGsdRqTwaTgN19u5VIJ gTLE6BrorSFWO3pm1P1oPwXgq X-Received: by 2002:a5d:618a:: with SMTP id j10mr15928540wru.168.1569919933395; Tue, 01 Oct 2019 01:52:13 -0700 (PDT) X-Received: by 2002:a5d:618a:: with SMTP id j10mr15928494wru.168.1569919932875; Tue, 01 Oct 2019 01:52:12 -0700 (PDT) Received: from localhost.localdomain ([151.29.237.241]) by smtp.gmail.com with ESMTPSA id y186sm4810444wmb.41.2019.10.01.01.52.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Oct 2019 01:52:11 -0700 (PDT) Date: Tue, 1 Oct 2019 10:52:09 +0200 From: Juri Lelli To: Scott Wood Cc: Sebastian Andrzej Siewior , Thomas Gleixner , Steven Rostedt , Peter Zijlstra , Daniel Bristot de Oliveira , Clark Williams , linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Subject: Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq() Message-ID: <20191001085209.GA6481@localhost.localdomain> References: <20190727055638.20443-1-swood@redhat.com> <20190727055638.20443-6-swood@redhat.com> <20190927081141.GB31660@localhost.localdomain> <9a4cc499e6de4690c682c03c0c880363fe3c9307.camel@redhat.com> <20190930071233.GE31660@localhost.localdomain> <9acc5f1bd0fe06acb2b7b518c5ef1f082e89ad63.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9acc5f1bd0fe06acb2b7b518c5ef1f082e89ad63.camel@redhat.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 30/09/19 11:24, Scott Wood wrote: > On Mon, 2019-09-30 at 09:12 +0200, Juri Lelli wrote: [...] > > Hummm, I was actually more worried about the fact that we call free_old_ > > cpuset_bw_dl() only if p->state != TASK_WAKING. > > Oh, right. :-P Not sure what I had in mind there; we want to call it > regardless. > > I assume we need rq->lock in free_old_cpuset_bw_dl()? So something like I think we can do with rcu_read_lock_sched() (see dl_task_can_attach()). > this: > > if (p->state == TASK_WAITING) > raw_spin_lock(&rq->lock); > free_old_cpuset_bw_dl(rq, p); > if (p->state != TASK_WAITING) > return; > > if (p->dl.dl_non_contending) { > .... > > BTW, is the full cpumask_intersects() necessary or would it suffice to see > that the new cpu is not in the old span? Checking new cpu only should be OK. Thanks, Juri