Is there any way to get a lru list in Linux kernel?

956 views Asked by At

I want to get a LRU list of zone.

I used lruvec in Zone struct and access lists in lruvec

Like this,

list_For_each(curr, &zone->lruvec.lists[LRU_INACTIVE_FILE])
list_for_each(curr, &zone->lruvec.lists[LRU_ACTIVE_FILE])

But, this loop didn't work cause lruvec's lists are empty.

I checked that lruvec was filled with some data linux kernel source code on memory(src/mm.c or include/linux/mm).

But I don't know how can I access and get the LRU list (active/inactive file)

Please help me, I can't solve ..

0

There are 0 answers