All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: peterz@infradead.org, roland@redhat.com, efault@gmx.de,
	rjw@sisk.pl, jdike@addtoit.com,
	user-mode-linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org
Subject: Re: [patch] don't preempt not TASK_RUNNING tasks
Date: Fri, 20 Mar 2009 12:39:43 +0100	[thread overview]
Message-ID: <20090320113943.GC11751@elte.hu> (raw)
In-Reply-To: <E1LkcrP-0003Np-T2@pomaz-ex.szeredi.hu>


* Miklos Szeredi <miklos@szeredi.hu> wrote:

> On Fri, 20 Mar 2009, Ingo Molnar wrote:
> > > > The first line of attack for this problem is making 
> > > > wait_task_inactive() sucks less, which shouldn't be too hard, 
> > > > that unconditional 1 jiffy sleep is simply retarded.
> > > 
> > > I completely agree.  However, I'd like to have a non-invasive 
> > > solution that can go into current and stable kernels so UML users 
> > > don't need to suffer any more.
> > 
> > Agreed. task_unlock_no_resched() should do that i think.
> 
> I don't see how that would help.

it more clearly expresses the need there, and we already have 
_no_resched API variants (we add them on an as-needed basis).

Doing:

 preempt_disable();
 read_lock();
 ...
 read_unlock();
 preempt_enable_no_resched();

Really just open-codes read_unlock_no_resched() and uglifies the 
code.

> ptrace_stop() specifically would need read_unlock_no_resched().  
> But I'm reluctant to add more spinlock functions with all their 
> variants...

if you worry about backportability, we can certainly add the easy 
fix too, if it's followed by the more involved fix(es).

	Ingo

      reply	other threads:[~2009-03-20 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-20  9:43 [patch] don't preempt not TASK_RUNNING tasks Miklos Szeredi
2009-03-20 10:03 ` Peter Zijlstra
2009-03-20 10:37   ` Miklos Szeredi
2009-03-20 10:53     ` Ingo Molnar
2009-03-20 11:25       ` Miklos Szeredi
2009-03-20 11:39         ` Ingo Molnar [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=20090320113943.GC11751@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=efault@gmx.de \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=peterz@infradead.org \
    --cc=rjw@sisk.pl \
    --cc=roland@redhat.com \
    --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 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.