Re: ptep_establish/establish_pte needs set_pte_atomic and all set_ptemust be written in asm

From: Rik van Riel
Date: Sat Sep 25 2004 - 19:39:55 EST


On Sun, 26 Sep 2004, Andrea Arcangeli wrote:

> I'm not very fond on software TLBs and their internal locking, but
> exactly because of what you said ("they grab the page_table_lock."), how
> can the software TLB ever care about the flush_tlb in between
> ptep_get_and_clear and set_pte?

It only grabs the page_table_lock if it finds pte_none(pte),
otherwise it'll run without any of the generic VM locks.

> How can a software TLB care about a tlb flush in between two pieces of
> code that are anyways under the page_table_lock?

Thing is, it's not under page_table_lock ;)

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/