public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Why yield in coredump_wait? [was: Re: Resent: BUG in RT 45-01 whenRT program dumps core]
@ 2005-05-19 14:23 kus Kusche Klaus
  2005-05-19 14:37 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: kus Kusche Klaus @ 2005-05-19 14:23 UTC (permalink / raw)
  To: Steven Rostedt, Linus Torvalds
  Cc: kus Kusche Klaus, Ingo Molnar, linux-kernel

> 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

Does that mean that the core dump is written 
with the rt prio of the task which dumps?

I'm not sure if this is a good idea: 
Dumping a big core might take *ages* (at least w.r.t. realtime),
especially because it usually goes to flash memory, a CF card,
or some other really slow device.

Doing that on a high rt prio is not nice; in an rt kernel, 
it may even keep interrupt handlers from responding...
Is there any way to do it in the background / at low prio?

-- 
Klaus Kusche                 (Software Development - Control Systems)
KEBA AG             Gewerbepark Urfahr, A-4041 Linz, Austria (Europe)
Tel: +43 / 732 / 7090-3120                 Fax: +43 / 732 / 7090-6301
E-Mail: kus@keba.com                                WWW: www.keba.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-19 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 14:23 Why yield in coredump_wait? [was: Re: Resent: BUG in RT 45-01 whenRT program dumps core] kus Kusche Klaus
2005-05-19 14:37 ` Steven Rostedt
2005-05-19 16:13   ` Lee Revell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox