backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Felix Fietkau <nbd@nbd.name>, backports@vger.kernel.org
Subject: Re: [PATCH 1/2] backports: add sched_set_fifo_low
Date: Sun, 15 Nov 2020 15:12:41 +0100	[thread overview]
Message-ID: <e55cfa6d-8bea-5f38-73f5-03b1f1f027db@hauke-m.de> (raw)
In-Reply-To: <20201112103546.74014-1-nbd@nbd.name>

On 11/12/20 11:35 AM, Felix Fietkau wrote:
> It is needed for mt76
> 
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
>   backport/backport-include/linux/sched.h | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
>   create mode 100644 backport/backport-include/linux/sched.h
> 
> diff --git a/backport/backport-include/linux/sched.h b/backport/backport-include/linux/sched.h
> new file mode 100644
> index 000000000000..be77a8d771ab
> --- /dev/null
> +++ b/backport/backport-include/linux/sched.h
> @@ -0,0 +1,19 @@
> +#ifndef __BACKPORT_LINUX_SCHED_H
> +#define __BACKPORT_LINUX_SCHED_H
> +
> +#include_next <linux/sched.h>
> +#include <linux/version.h>
> +
> +#if LINUX_VERSION_IS_LESS(5,9,0)
> +#include <uapi/linux/sched/types.h>
> +
> +static inline void sched_set_fifo_low(struct task_struct *p)
> +{
> +	struct sched_param sparam = {.sched_priority = 1};
> +
> +	sched_setscheduler(p, SCHED_FIFO, &sparam);

Hi Felix,

The upstream kernel uses this in sched_set_fifo_low():
    WARN_ON_ONCE(sched_setscheduler_nocheck(p, SCHED_FIFO, &sp) != 0);
See:
https://elixir.bootlin.com/linux/v5.10-rc3/source/kernel/sched/core.c#L5570

Did you change this intentionally?

Hauke
--
To unsubscribe from this list: send the line "unsubscribe backports" in

      parent reply	other threads:[~2020-11-15 14:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 10:35 [PATCH 1/2] backports: add sched_set_fifo_low Felix Fietkau
2020-11-12 10:35 ` [PATCH 2/2] backports: add tasklet_setup, from_tasklet Felix Fietkau
2020-11-15 14:12 ` Hauke Mehrtens [this message]

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=e55cfa6d-8bea-5f38-73f5-03b1f1f027db@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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;
as well as URLs for NNTP newsgroup(s).