Re: BUG_ON(!cpus_equal(cpumask, tmp));

From: Srivatsa Vaddagiri (vatsa_at_in.ibm.com)
Date: 04/01/04

  • Next message: Hugh Dickins: "Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix"
    Date:	Thu, 1 Apr 2004 10:34:13 +0530
    To: Andy Whitcroft <apw@shadowen.org>
    
    

    On Thu, Apr 01, 2004 at 01:31:15AM +0000, Andy Whitcroft wrote:
    > spin_lock(&tlbstate_lock);
    > +
    > + /* Subtle, mask the request mask with the currently online cpu's.
    > + * Sample this under the lock; cpus in the the middle of going
    > + * offline will wait until there is noone in this critical section
    > + * before disabling IPI handling. */
    > + cpus_and(tmp, cpumask, cpu_online_map);
    > + if(cpus_empty(tmp))
    > + return;

    Hmm ..Doesn't it need to drop tlbstate_lock before returning?

    > + /* Subtle, IPI users assume that they will be able to get IPI's
    > + * though to the cpus listed in cpu_online_map. To ensure this
    > + * we add the requirement that they check cpu_online_map within
    > + * the IPI critical sections. Here we remove ourselves from the
    > + * map, then ensure that all other cpus have left the relevant
    > + * critical sections since the change. We do this by aquiring
    > + * the relevant section locks, if we have them none else is in
    > + * them. Once this is done we can go offline. */
    > + spin_lock(&tlbstate_lock);
    > + spin_unlock(&tlbstate_lock);
    > + spin_lock(&tlbstate_lock);
    > + spin_unlock(&tlbstate_lock);

    The second lock should be call_lock?

    -- 
    Thanks and Regards,
    Srivatsa Vaddagiri,
    Linux Technology Center,
    IBM Software Labs,
    Bangalore, INDIA - 560017
    -
    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/
    

  • Next message: Hugh Dickins: "Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix"