Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4410716imm; Mon, 18 Jun 2018 14:37:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI7JOXtM74IbD/arTsIvGqDloEClnwrjgpLmujkCSAjbhMVnQTZSZ7r37Go/Gn+irQzLn7E X-Received: by 2002:a62:a38d:: with SMTP id q13-v6mr15287683pfl.49.1529357854247; Mon, 18 Jun 2018 14:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529357854; cv=none; d=google.com; s=arc-20160816; b=KdZZRqXqebN7UIECnMAJOMhlsAKJ3bePABpSHKAimH/ye4VchQ+HH2Rr2EfUmqppGU 9KJoCe2xBFCrwi/kHh4rLCfWKjsMh+RUz9VlpdaDytdOvnEL22Bf6HVHao5fGND1yfSw dVhjcl6/tmadmnU479Djo4Snr6Zp5CuSBkwGHJOcrwfoJLezMB6+J3eefUSMOG1sz9uc 4cowrlXM4YFXSN8p0grvDd+ynlh6PN6rM8jDCq53AWSAHZEguwSXmW3wC4gGY9RxZql7 6En9n1a47qZjfaTakgazfnAfi9oENZ9h5b9wDJt/QR03J6Fqn+lM4StkC1qo9jKwOwH7 5zbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=i8KI7UCUTv2X1k3p/Ycdq2qqO8xPkTv4cO+IeAS4otc=; b=fwRF3opye4UhgjqC04IpTxkofX/ohBW9WG4QcCa572pzgUOpGK2maCmgBOn/c4/rEx aLL9OHM/eAlyeYL1Byb6JudiiHKT1URprSqXYLpTgMLmCQ8t+rqYrXXzW7IJ7oczubrg VQ+09xLRtImNqq9OQ7aFqb5l0UYdqi0e96E2DWWQu9voPxDLCLZg2KnexeiWsGR0hKBe HZI0DAtag/IdUZ3oqPFLgDMXFajjCm+cd0c0FsaQwt0F6MUMsKz8wMtCd7WOMCn2tex0 v0Ts0dmozhlTeeYs1DE8S8B3PtV8vS9zQWwRc8RJpCXHehjNXJzM2tha/lFzxt0vsAv9 eoXg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d89-v6si14849666pfj.311.2018.06.18.14.37.20; Mon, 18 Jun 2018 14:37:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755402AbeFRVgj (ORCPT + 99 others); Mon, 18 Jun 2018 17:36:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:39018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755344AbeFRVgi (ORCPT ); Mon, 18 Jun 2018 17:36:38 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4AE2F2075E; Mon, 18 Jun 2018 21:36:37 +0000 (UTC) Date: Mon, 18 Jun 2018 17:36:35 -0400 From: Steven Rostedt To: Byungchul Park Cc: peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de, raistlin@linux.it, linux-kernel@vger.kernel.org, juri.lelli@gmail.com, bristot@redhat.com, kernel-team@lge.com, joel@joelfernandes.org Subject: Re: [RESEND PATCH v12 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() Message-ID: <20180618173635.2a89b580@gandalf.local.home> In-Reply-To: <1529297889-24551-2-git-send-email-byungchul.park@lge.com> References: <1529297889-24551-1-git-send-email-byungchul.park@lge.com> <1529297889-24551-2-git-send-email-byungchul.park@lge.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jun 2018 13:58:08 +0900 Byungchul Park wrote: > Hello Juri, > > I've changed the code a little bit to avoid a compile warning caused by > 'const' args of find_cpu(). Can I keep your Acked-by? > > BEFORE: > static int find_cpu(const struct cpumask *mask, > const struct sched_domain *sd, > const struct sched_domain *prefer) > > AFTER: > static int find_cpu(const struct cpumask *mask, > struct sched_domain *sd, > struct sched_domain *prefer) > Instead of doing that, why not fix sched_domain_span() to take a constant. There's no reason that function should be modifying the sched_domain. -- Steve > (I temporarily removed the Acked-by you gave me.) > Acked-by: Juri Lelli > > -----8<----- > >From 5a4753e8c15369420a16fa04026f74ae5c9d377c Mon Sep 17 00:00:00 2001 > From: Byungchul Park > Date: Mon, 4 Jun 2018 16:46:56 +0900 > Subject: [RESEND PATCH v12 1/2] sched/deadline: Add support for SD_PREFER_SIBLING on > find_later_rq() > > It would be better to try to check other siblings first if > SD_PREFER_SIBLING is flaged when pushing tasks - migration. > > Suggested-by: Peter Zijlstra > Signed-off-by: Byungchul Park > --- > kernel/sched/deadline.c | 80 ++++++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 73 insertions(+), 7 deletions(-) > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index 1356afd..6130d40 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > @@ -1853,12 +1853,33 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu > > static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask_dl); > > +/* > + * Find the first CPU in: mask & sd & ~prefer > + */ > +static int find_cpu(const struct cpumask *mask, > + struct sched_domain *sd, > + struct sched_domain *prefer) > +{ > + int cpu; > + > + for_each_cpu(cpu, mask) { > + if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) > + continue; > + if (prefer && cpumask_test_cpu(cpu, sched_domain_span(prefer))) > + continue; > + break; > + } > + > + return cpu; > +} > + >