lkml.org 
[lkml]   [2004]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] rcu: eliminate rcu_data.last_qsctr
    Oleg Nesterov wrote:

    >last_qsctr is used in rcu_check_quiescent_state() exclusively.
    >We can reset qsctr at the start of the grace period, and then
    >just test qsctr against 0.
    >
    >
    >
    It seems the patch got lost, I've updated it a bit and resent it to Andrew.

    But: I think there is the potential for an even larger cleanup, although
    this would be more a rewrite:
    Get rid of rcu_check_quiescent_state and instead use something like this
    in rcu_qsctr_inc:

    static inline void rcu_qsctr_inc(int cpu)
    {
    struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
    if (rdp->quiescbatch != rcp->cur) {
    /* a new grace period is running. And we are at a quiescent
    * point, so complete it
    */
    spin_lock(&rsp->lock);
    rdp->quiescbatch = rcp->cur;
    cpu_quiet(rdp->cpu, rcp, rsp);
    spin_unlock(&rsp->lock);
    }
    }

    It's just an idea, it needs testing on big systems - does reading from
    the global rcp from every schedule call cause any problems? The cache
    line is virtually read-only, so it shouldn't cause trashing, but who knows?

    --
    Manfred
    -
    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: 2005-03-22 14:09    [W:3.253 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site