[PATCH 2/3] native hash clear

Milton Miller miltonm at bga.com
Fri May 6 18:39:33 EST 2005


On May 6, 2005, at 12:33 AM, Paul Mackerras wrote:

> R Sharada writes:
>
>> Add code to clear the hash table and invalidate the tlb for native 
>> (SMP,
>> non-LPAR) mode.  Supports 16M and 4k pages.
>
>> +	/* we take the tlbie lock and hold it.  Some hardware will
>> +	 * deadlock if we try to tlbie from two processors at once.
>> +	 */
>> +	spin_lock(&native_tlbie_lock);
> ...
>> +		/*
>> +		 * we could lock the pte here, but we are the only cpu
>> +		 * running,  right?  and for crash dump, we probably
>> +		 * don't want to wait for a maybe bad cpu.
>> +		 */
>
> So which is it?  Are we locking things, and possibly waiting forever
> for a bad cpu, or are we not locking things?  Or is there a reason why
> we lock in one case but not the other?

Right now, a bit of both.

We don't worry about software interlocks, but we do use the lock
over the smaller area that protects us from causing a hardware
deadlock.

So, the question is, is this the right tradeoff?

milton




More information about the Linuxppc64-dev mailing list