mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] wait_task_inactive: don't use the dummy version when !SMP && PREEMPT
Date: Wed, 30 Jul 2008 10:42:28 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807301038170.3334@nehalem.linux-foundation.org> (raw)
In-Reply-To: <20080730170949.GA18682@tv-sign.ru>



On Wed, 30 Jul 2008, Oleg Nesterov wrote:
>
> The patch looks monstrous because it moves the (unchanged) definition
> of wait_task_inactive() outside of "#ifdef CONFIG_SMP", but it is quite
> trivial.

Hmm. Doesn't this just deadlock in UP (PREEMPT) if wait_task_interactive() 
is ever called from a no-preempt context? 

And if that's never the case, the comment should be updated to reflect 
that (right now it says that it's only invalid to call it with interrupts 
disabled to avoid cross-IPI deadlocks).

Oh, and shouldn't it do a "yield()" instead of a cpu_relax() on UP?

Inquiring minds want to know. That function was very much expressly 
designed for SMP, not for preemption, and I want to understand why it's 
ok (_if_ it's ok).

		Linus

  reply	other threads:[~2008-07-30 17:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 17:09 Oleg Nesterov
2008-07-30 17:42 ` Linus Torvalds [this message]
2008-07-30 18:13   ` Oleg Nesterov
2008-07-30 19:46   ` Dmitry Adamushko
2008-07-31 13:12     ` Oleg Nesterov
2008-07-31  2:22 ` Roland McGrath

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=alpine.LFD.1.10.0807301038170.3334@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    --cc=roland@redhat.com \
    /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

all inboxes | Powered by JetHome®