lkml.org 
[lkml]   [2006]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC] Event counters [1/3]: Basic counter functionality
    From
    Date
    On Mon, 2006-01-02 at 19:40 -0200, Marcelo Tosatti wrote:

    > Nick,
    >
    > The following patch:
    >
    > - Moves the lightweight "inc/dec" versions of mod_page_state variants
    > to three underscores, making those the default for locations where enough
    > locks are held.
    >

    I guess I was hoping to try to keep it simple, and just have two
    variants, the __ version would require the caller to do the locking.
    In cases like eg. allocstall, they should happen infrequently enough
    that the extra complexity is probably not worth worrying about.

    I don't think I commented about the preempt race though (and requirement
    to have preempt off from process context), which obviously can be a
    problem as you say (though I think things are currently safe?).

    > - Make the two-underscore version disable and enable preemption, which
    > is required to avoid preempt-related races which can result in missed
    > updates.
    >
    > - Extends the lightweight version usage in page reclaim,
    > pte allocation, and a few other codepaths.
    >

    I guess nr_dirty looks OK in the places it can be put under tree_lock.

    nr_page_table_pages is OK because ptl should be held to prevent preempt.

    pgrotated and pgactivate should be good because of lru_lock.

    Thanks for going through these!

    --
    SUSE Labs, Novell Inc.



    Send instant messages to your online friends http://au.messenger.yahoo.com

    -
    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: 2006-01-03 06:14    [W:0.040 / U:92.160 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site