Re: [PATCH] swap migration: Fix lru drain

From: Nick Piggin
Date: Wed Dec 07 2005 - 19:59:00 EST


Christoph Lameter wrote:

On Thu, 8 Dec 2005, Nick Piggin wrote:


Do we need a lock_cpu_hotplug() around here?


Well, then we may need that lock for each "for_each_online_cpu" use?


I think it depends on where and how it is used?

eg. for statistics gathering it doesn't matter so much. In this
case it would seem that you do want an actual online CPU... though
on looking at the workqueue code it seems that some of it would be
racy in a similar way, so perhaps this is handled elsewhere (I
can't see how, though).



Can't this deadlock if 2 CPUs each send work to the other


Then we would need to fix the workqueue flushing function.



Oh, you're right.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/