public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Li Hua <hucool.lihua@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2, RESEND] sched/rt: Try to restart rt period timer when rt runtime exceeded
Date: Fri, 3 Dec 2021 08:17:40 +0100	[thread overview]
Message-ID: <YanElPGuGJ8J6UK9@kroah.com> (raw)
In-Reply-To: <20211203033618.11895-1-hucool.lihua@huawei.com>

On Fri, Dec 03, 2021 at 03:36:18AM +0000, Li Hua wrote:
> When rt_runtime is modified from -1 to a valid control value, it may
> cause the task to be throttled all the time. Operations like the following
> will trigger the bug. E.g:
> 1. echo -1 > /proc/sys/kernel/sched_rt_runtime_us
> 2. Run a FIFO task named A that executes while(1)
> 3. echo 950000 > /proc/sys/kernel/sched_rt_runtime_us
> 
> When rt_runtime is -1, The rt period timer will not be activated when task
> A enqueued. And then the task will be throttled after setting rt_runtime to
> 950,000. The task will always be throttled because the rt period timer is
> not activated.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Li Hua <hucool.lihua@huawei.com>
> ---
> v1->v2:
>   - call do_start_rt_bandwidth to reduce repetitive code.
>   - use raw_spin_lock_irqsave to avoid deadlock on a timer context.
> ---
>  kernel/sched/rt.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

  reply	other threads:[~2021-12-03  7:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  3:36 [PATCH v2, RESEND] sched/rt: Try to restart rt period timer when rt runtime exceeded Li Hua
2021-12-03  7:17 ` Greg KH [this message]
2021-12-07  1:38   ` Lihua (lihua, ran)
2021-12-04 11:34 ` Peter Zijlstra
2021-12-06  1:42   ` Lihua (lihua, ran)
2021-12-07 14:22 ` [tip: sched/core] " tip-bot2 for Li Hua

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=YanElPGuGJ8J6UK9@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hucool.lihua@huawei.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=stable@vger.kernel.org \
    --cc=vincent.guittot@linaro.org \
    /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