lkml.org 
[lkml]   [2007]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] flush_cpu_workqueue: don't flush an empty ->worklist
    On 01/08, Andrew Morton wrote:
    >
    > That's not correct. freeze_processes() will freeze *all* processes. All
    > of them are forced to enter refrigerator(). With the mysterious exception
    > of some I/O-related kernel threads, which might need some thought.

    Yes, and we can remove a dead CPU safely, this part is ok.

    > > and
    > > http://marc.theaimsgroup.com/?l=linux-kernel&m=116817460726058.
    >
    > Am not sure how that's related.

    but at some point we should thaw processes, including cwq->thread which
    should die. So we are doing things like take_over_work() and this is the
    source of races, because the dead CPU is not on cpu_online_map.

    flush_workqueue() doesn't use any locks now. If we use freezer to implement
    cpu-hotplug nothing will change, we still have races.

    It looks so obvious to me, so I'm starting to suspect I missed something
    very simple :(

    Oleg.

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

    \
     
     \ /
      Last update: 2007-01-09 16:41    [W:5.190 / U:0.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site