On Mon, Jan 15, 2007 at 03:54:01PM +0300, Oleg Nesterov wrote: > > - singlethread_cpu needs to be hotplug safe (broken currently) > > Why? Could you explain?
What if 'singlethread_cpu' dies? > > - Any reason why cpu_populated_map is not modified on CPU_DEAD? > > Because CPU_DEAD/CPU_UP_CANCELED doesn't wait for cwq->thread to exit. > cpu_populated_map never shrinks, it only grows on CPU_UP_PREPARE. > > We can change this, but it needs some more code, and I am not sure > we need it. Note that a "false" bit in cpu_populated_map only means > that flush_work/flush_workqueue/destroy_workqueu will do lock/unlock > of cwq->lock, nothing more. What abt __create_workqueue/schedule_on_each_cpu? > > - I feel more comfortable if workqueue_cpu_callback were to take > > workqueue_mutex in LOCK_ACQ and release it in LOCK_RELEASE > > notifications. > > The whole purpose of this change to avoid this! I guess it depends on how __create_workqueue/schedule_on_each_cpu is modified (whether we take/release lock upon LOCK_ACQ/LOCK_RELEASE) > > Finally, I wonder if these changes will be unnecessary if we move to > > process freezer based hotplug locking ... > > This change ir not strictly necessary but imho make the code better and > shrinks .text by 379 bytes. > > But I believe that freezer will change nothing for workqueue. We still > need take_over_work(), and hacks like migrate_sequence. And no, CPU_DEAD > can't just thaw cwq->thread which was bound to the dead CPU to complete > kthread_stop(), we should thaw all processes. What abt stopping that thread in CPU_DOWN_PREPARE (before freezing processes)? I understand that it may add to the latency, but compared to the overall latency of process freezer, I suspect it may not be much. -- Regards, vatsa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/