From: Corey Minyard <cminyard@mvista.com>
To: Brian Silverman <brian@peloton-tech.com>, linux-kernel@vger.kernel.org
Cc: linux-rt-users@vger.kernel.org, bigeasy@linutronix.de
Subject: Re: [PATCH] Force processes to non-realtime before mm_exit
Date: Sat, 4 Jun 2016 19:28:09 -0500 [thread overview]
Message-ID: <57537219.8020904@mvista.com> (raw)
In-Reply-To: <1464995924-16367-1-git-send-email-brian@peloton-tech.com>
On 06/03/2016 06:18 PM, Brian Silverman wrote:
> Without this, a realtime process which has called mlockall exiting
> causes large latencies for other realtime processes at the same or
> lower priorities. This seems like a fairly common use case too, because
> realtime processes generally want their memory locked into RAM.
Could this cause a subtle priority inversion for a process waiting
on this process to die? I'm thinking that if this is a critical process,
it crashes, and the system is very busy with other RT processes,
it could take a long time before the process gets restarted when
it is expected to happen quickly.
I don't have another solution for you, and beyond speeding up the
memory reclamation process (which may not be possible or easy)
I'm not sure there is. I'm just pointing out a possible side effect.
-corey
> Signed-off-by: Brian Silverman <brian@peloton-tech.com>
> ---
> kernel/exit.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/kernel/exit.c b/kernel/exit.c
> index a0cf72b..68a97df 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -730,6 +730,12 @@ void do_exit(long code)
> tsk->exit_code = code;
> taskstats_exit(tsk, group_dead);
>
> + if (tsk->policy == SCHED_FIFO || tsk->policy == SCHED_RR) {
> + struct sched_param param = { .sched_priority = 0 };
> +
> + sched_setscheduler_nocheck(current, SCHED_NORMAL, ¶m);
> + }
> +
> exit_mm(tsk);
>
> if (group_dead)
next prev parent reply other threads:[~2016-06-05 0:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 23:18 [PATCH] Force processes to non-realtime before mm_exit Brian Silverman
2016-06-05 0:28 ` Corey Minyard [this message]
2016-07-14 17:24 ` Peter Zijlstra
2016-09-02 15:02 ` Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2016-05-10 18:04 Brian Silverman
2016-05-12 8:59 ` Sebastian Andrzej Siewior
2016-05-16 21:05 ` Brian Silverman
2016-05-25 16:33 ` Sebastian Andrzej Siewior
2016-05-25 18:00 ` Brian Silverman
2016-05-25 19:54 ` Sebastian Andrzej Siewior
2016-06-03 23:33 ` Brian Silverman
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=57537219.8020904@mvista.com \
--to=cminyard@mvista.com \
--cc=bigeasy@linutronix.de \
--cc=brian@peloton-tech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.