mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: kus Kusche Klaus <kus@keba.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Why yield in coredump_wait? [was: Re: Resent: BUG in RT 45-01 when RT program dumps core]
Date: Thu, 19 May 2005 09:37:00 -0400	[thread overview]
Message-ID: <1116509820.15866.28.camel@localhost.localdomain> (raw)
In-Reply-To: <1116503763.15866.9.camel@localhost.localdomain>

In the function coredump_wait there's a yield called:

static void coredump_wait(struct mm_struct *mm)
{
[...]
        /* give other threads a chance to run: */
        yield();

        zap_threads(mm);
[...]

I don't see any reason for this.  Although the comment says it's giving
other threads a chance to run, but the zap_threads below it will just
send a kill signal to all those sharing the mm and then this thread will
wait for completion (if there were threads to wait on).

Now if there were no other threads to wait on it would just continue.
So, is there some real reason that this yield is there? Or is it just
trying to be nice, as in saying, "I'm dieing now and just don't want to
waste others time" (which I highly doubt is the case).

The reason I'm asking this, is that RT tasks should not call yield,
since it is pretty much meaningless, since an RT task won't yield to any
task of lesser priority, and in Ingo's current kernel the yield will
send a bug message if it was called by an RT task.

Thanks,

-- Steve




  parent reply	other threads:[~2005-05-19 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19  6:36 Resent: BUG in RT 45-01 when RT program dumps core kus Kusche Klaus
2005-05-19 11:56 ` Steven Rostedt
2005-05-19 12:38   ` Serge Noiraud
2005-05-19 13:12     ` Steven Rostedt
2005-05-19 13:37   ` Steven Rostedt [this message]
2005-05-19 15:47     ` Why yield in coredump_wait? [was: Re: Resent: BUG in RT 45-01 when RT program dumps core] Lee Revell
2005-05-19 16:03       ` Steven Rostedt
2005-05-19 17:25     ` Daniel Walker
2005-05-19 17:43       ` Alan Cox
2005-05-19 18:05         ` Steven Rostedt
2005-05-23  7:53           ` 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=1116509820.15866.28.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=kus@keba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.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 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®