public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	roland@redhat.com, efault@gmx.de, rjw@sisk.pl, jdike@addtoit.com,
	user-mode-linux-devel@lists.sourceforge.net,
	torvalds@linux-foundation.org, akpm@linux-foundation.org,
	stable@kernel.org
Subject: Re: [patch] fix ptrace slowness
Date: Mon, 23 Mar 2009 16:53:03 +0100	[thread overview]
Message-ID: <20090323155303.GA5528@redhat.com> (raw)
In-Reply-To: <20090323151954.GC21267@elte.hu>

On 03/23, Ingo Molnar wrote:
>
> There's an alternative patch
> below. Would you mind to give it a test? Chances are that it will
> make UML even faster than your fix.
>
> 	Ingo
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 3e827b8..2d60f23 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -2119,7 +2119,8 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
>  		 * yield - it could be a while.
>  		 */
>  		if (unlikely(on_rq)) {
> -			schedule_timeout_uninterruptible(1);
> +			cpu_relax();
> +			cond_resched();

What if the caller is a realtime task? We can spin "forever", no?

Oleg.


  reply	other threads:[~2009-03-23 16:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 15:07 [patch] fix ptrace slowness Miklos Szeredi
2009-03-23 15:19 ` Ingo Molnar
2009-03-23 15:53   ` Oleg Nesterov [this message]
2009-03-23 16:13     ` Ingo Molnar
2009-03-23 16:17   ` Miklos Szeredi
2009-03-23 16:38     ` Ingo Molnar
2009-03-23 19:08     ` Michael Riepe
2009-03-23 16:39 ` [tip:sched/urgent] sched, ptrace: fix UML and " Miklos Szeredi
2009-03-23 17:14   ` 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=20090323155303.GA5528@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --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=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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