[lkml]   [2010]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] lglock: make lg_lock_global() actually lock globally
    On Thu, Aug 26, 2010 at 12:08:49PM +0200, Peter Zijlstra wrote:
    > On Thu, 2010-08-26 at 11:49 +0200, Tejun Heo wrote:
    > > If there's a pressing need, doing stop_machine for
    > > onlining too is definitely an option.
    > I would argue against that.. we should try and rid ourselves of
    > stopmachine, not add more dependencies on it. If you want to sync
    > against preempt_disable thingies synchronize_sched() is your friend.

    I don't think it's that easy to do it in hotplug handlers.

    Say take a brlock (not the best example because the write side
    is a slowpath itself, but I could imagine better cases), then
    you actually want to be able to prevent cpu online map from
    changing for the entire period of a lock/unlock.

    The lock/unlock is preempt disabled. synchronize_sched in the
    plug handler will not really do anything, because there could
    be subsequent write locks coming in from other CPUs at any
    time during the handler, before or after synchronize_sched runs.

    I think for CPU plug, stop_machine is reasonable (especially
    considering it is required in unload, which means any frequent
    amount of cpu plug activity already will require stop_machine to
    run anyway).

     \ /
      Last update: 2010-08-26 13:41    [W:0.019 / U:3.444 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site