mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: PATCH: Fix race in cpu_down (hotplug cpu)
@ 2005-09-19  4:48 Li, Shaohua
  2005-09-19  5:10 ` Srivatsa Vaddagiri
  2005-09-19  5:23 ` Nigel Cunningham
  0 siblings, 2 replies; 27+ messages in thread
From: Li, Shaohua @ 2005-09-19  4:48 UTC (permalink / raw)
  To: vatsa, Nigel Cunningham
  Cc: Andrew Morton, Linus Torvalds, Zwane Mwaikambo,
	Linux Kernel Mailing List, Rusty Russell

Hi,
>
>On Mon, Sep 19, 2005 at 01:28:38PM +1000, Nigel Cunningham wrote:
>> There is a race condition in taking down a cpu
(kernel/cpu.c::cpu_down).
>> A cpu can already be idling when we clear its online flag, and we do
not
>> force the idle task to reschedule. This results in __cpu_die timing
out.
>
>"when we clear its online flag" - This happens in take_cpu_down in the
>context of stopmachine thread. take_cpu_down also ensures that idle
>thread runs when it returns (sched_idle_next). So when idle thread
runs,
>it should notice that it is offline and invoke play_dead.  So I don't
>understand why __cpu_die should time out.
I guess Nigel's point is cpu_idle is preempted before take_cpu_down. If
the preempt occurs after the cpu_is_offline check, when the cpu (after
sched_idle_next) goes into idle again, nobody can wake it up. Nigel,
isn't it?

Thanks,
Shaohua

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Where do packets sent to 255.255.255.255 go?
@ 2005-08-25  1:02 Daniel Brockman
  2005-08-25  8:17 ` Eric Piel
  0 siblings, 1 reply; 27+ messages in thread
From: Daniel Brockman @ 2005-08-25  1:02 UTC (permalink / raw)
  To: linux-kernel

Hi list,

If I understand correctly, packets sent to the all-ones
broadcast address only go out through a single interface.

My question is threefold:

 1. Why doesn't Linux send 255.255.255.255 packages through
    all network interfaces?  (I realize that this is
    probably not a Linux-specific question.)

 2. How does it choose which interface to send through?
    My first guess was that it just took the first Ethernet
    interface and used that for broadcasting.  But playing
    around with nameif, this seems not to be the case.

 3. Can I set the default broadcast interface explicitly?
    For example, say I wanted broadcasts to go out over eth1
    by default, instead of over eth0.  What if I wanted them
    to get sent through tap0?

Yes, I know that what I *should* be doing is just send the
packages to the broadcast address specific to the network
where I want them to go.  (That is, I should be sending them
to 10.255.255.255 instead of 255.255.255.255 if I want them
to be broadcast to the 10.0.0.0 network.)

Unfortunately, this is not a viable option in my case, as
I'm dealing with a closed-source application that
unconditionally sends broadcasts to 255.255.255.255.
Ideally, the application would let me choose which interface
to broadcast to, but alas it does not.

I've tried searching for a solution to this problem on the
web and on IRC with no luck, so now I'm turning to you guys.


Thanks in advance,

-- 
Daniel Brockman <daniel@brockman.se>


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

end of thread, other threads:[~2005-09-20  4:42 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19  4:48 PATCH: Fix race in cpu_down (hotplug cpu) Li, Shaohua
2005-09-19  5:10 ` Srivatsa Vaddagiri
2005-09-19  5:31   ` Shaohua Li
2005-09-19  5:57     ` Srivatsa Vaddagiri
2005-09-19  6:11       ` Nigel Cunningham
2005-09-19  6:23         ` Srivatsa Vaddagiri
2005-09-19  6:29           ` Nick Piggin
2005-09-19  7:00             ` Srivatsa Vaddagiri
2005-09-19  6:31           ` Nigel Cunningham
2005-09-19  7:09             ` Srivatsa Vaddagiri
2005-09-19  6:37           ` Shaohua Li
2005-09-19  6:36             ` Nick Piggin
2005-09-19  6:54               ` Nigel Cunningham
2005-09-19  7:12               ` Shaohua Li
2005-09-19  7:22                 ` Nick Piggin
2005-09-19  7:28                   ` Ingo Molnar
2005-09-19  7:37                     ` Nick Piggin
2005-09-19 22:55                       ` Nigel Cunningham
2005-09-20  4:41                         ` Srivatsa Vaddagiri
2005-09-19  7:07             ` Srivatsa Vaddagiri
2005-09-19  5:23 ` Nigel Cunningham
2005-09-19  5:28   ` Srivatsa Vaddagiri
2005-09-19  5:35     ` Nigel Cunningham
2005-09-19  7:43       ` Where do packets sent to 255.255.255.255 go? Wei-Che, Hsu
  -- strict thread matches above, loose matches on Subject: below --
2005-08-25  1:02 Daniel Brockman
2005-08-25  8:17 ` Eric Piel
2005-08-25 10:01   ` Daniel Brockman

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®