From: Oleg Nesterov <oleg@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: roland@redhat.com, peterz@infradead.org, efault@gmx.de,
rjw@sisk.pl, jdike@addtoit.com, mingo@elte.hu,
user-mode-linux-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [patch] fix uml slowness caused by ptrace preemption bug on host
Date: Fri, 20 Mar 2009 15:04:09 +0100 [thread overview]
Message-ID: <20090320140409.GB20965@redhat.com> (raw)
In-Reply-To: <E1LkZjf-0002vu-84@pomaz-ex.szeredi.hu>
On 03/20, Miklos Szeredi wrote:
>
> I'm no scheduler expert either.
neither me ;)
> --- linux.git.orig/kernel/sched.c 2009-03-18 12:53:47.000000000 +0100
> +++ linux.git/kernel/sched.c 2009-03-20 08:58:13.000000000 +0100
> @@ -4629,7 +4629,8 @@ asmlinkage void __sched preempt_schedule
> * If there is a non-zero preempt_count or interrupts are disabled,
> * we do not want to preempt the current task. Just return..
> */
> - if (likely(ti->preempt_count || irqs_disabled()))
> + if (likely(ti->preempt_count || irqs_disabled() ||
> + current->state != TASK_RUNNING))
But this was specially designed to allow to preempt !TASK_RUNNING tasks,
note the "if (prev->state && !(preempt_count() & PREEMPT_ACTIVE))" in
schedule().
Perhaps "|| current->state == TASK_TRACED" makes more sense, TASK_TRACED
is special because we know we are going to schedule really soon. But I think
your previous patch is better, imho we should change preempt_schedule() to
fix the very specific problem with ptrace_notify().
Oleg.
next prev parent reply other threads:[~2009-03-20 14:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 22:23 [patch] fix uml slowness caused by ptrace preemption bug on host Miklos Szeredi
2009-03-19 23:33 ` Roland McGrath
2009-03-20 8:05 ` Miklos Szeredi
2009-03-20 14:04 ` Oleg Nesterov [this message]
2009-03-20 13:51 ` Oleg Nesterov
2009-03-20 8:19 ` Peter Zijlstra
2009-03-20 8:27 ` Miklos Szeredi
2009-03-20 8:30 ` Ingo Molnar
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=20090320140409.GB20965@redhat.com \
--to=oleg@redhat.com \
--cc=efault@gmx.de \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rjw@sisk.pl \
--cc=roland@redhat.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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