[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

about get_pte_fast and more



Hi, all:
 I am studying the source code of mm in linux. Here, I have a question and I
am looking forward for any of your comments.
 The question have bother me for a long time is about some functions defined
in arch/i386/pgtable.h. to make it clear, I paste one of them here:

extern __inline__ pte_t *get_pte_fast(void)
{
 unsigned long *ret;

 if((ret = (unsigned long *)pte_quicklist) != NULL) {
  pte_quicklist = (unsigned long *)(*ret);
  ret[0] = ret[1];
  pgtable_cache_size--;
 }
 return (pte_t *)ret;
}

my questions are:
1. what is pte_quicklist and pgd_quicklist? Are they TLB?
2.what¡¯s on earth the function of these strange code? It appears
pte_quicklist is only a pointer to long integer but never a list and why
¡®ret[0]=ret[1]¡¯?

thank you.

Wang


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/