mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Shang XiaoJing <shangxiaojing@huawei.com>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/deadline: Add should_push_task_away helper
Date: Wed, 31 Aug 2022 11:23:51 +0200	[thread overview]
Message-ID: <95f8c01c-12b2-5f2e-bc8f-288f16bfa5d3@redhat.com> (raw)
In-Reply-To: <20220829100533.19153-1-shangxiaojing@huawei.com>

On 8/29/22 12:05, Shang XiaoJing wrote:
> +static inline bool should_push_task_away(struct task_struct *a,
> +					  struct task_struct *b)

static inline bool should_push_task_dl(struct task_struct *curr, struct task_struct *p)

a and b are not good variable names, and add the _dl suffix (instead of away).

> +{
> +	return unlikely(dl_task(a)) &&
> +	       (a->nr_cpus_allowed < 2 ||
> +		!dl_entity_preempt(&b->dl, &a->dl)) &&
> +	       b->nr_cpus_allowed > 1;
> +}
> +

-- Daniel


  reply	other threads:[~2022-08-31  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 10:05 Shang XiaoJing
2022-08-31  9:23 ` Daniel Bristot de Oliveira [this message]
2022-08-31  9:30   ` shangxiaojing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95f8c01c-12b2-5f2e-bc8f-288f16bfa5d3@redhat.com \
    --to=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shangxiaojing@huawei.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®