|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] LRU for recycling shadow pages
At 01:37 -0700 on 02 Aug (1186018635), Sangmin Lee wrote:
> Can anyone give me an description on how LRU for recycling
> shadow pages is implemented?
The LRU is only very approximate: we keep a linked list of the top-level
shadow pages, and pull entries to the front when they're used in a CR3
write. Each entry on the list has an extra "pin" reference taken to
stop it being torn down when it's not in a CR3.
When we need to reclaim shadow memory, we drop those pin references,
starting from the tail end of the list, which causes shadow pagetable
hierarchies to be recursively torn down.
Code is in shadow_prealloc() in arch/x86/mm/shadow/common.c
Cheers,
Tim.
--
Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|