* LRU for recycling shadow pages
@ 2007-08-02 8:37 Sangmin Lee
2007-08-02 9:17 ` Tim Deegan
0 siblings, 1 reply; 2+ messages in thread
From: Sangmin Lee @ 2007-08-02 8:37 UTC (permalink / raw)
To: xen-devel
Hi all,
Can anyone give me an description on how LRU for recycling
shadow pages is implemented?
Thanks,
Sangmin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: LRU for recycling shadow pages
2007-08-02 8:37 LRU for recycling shadow pages Sangmin Lee
@ 2007-08-02 9:17 ` Tim Deegan
0 siblings, 0 replies; 2+ messages in thread
From: Tim Deegan @ 2007-08-02 9:17 UTC (permalink / raw)
To: Sangmin Lee
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@xensource.com>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-02 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02 8:37 LRU for recycling shadow pages Sangmin Lee
2007-08-02 9:17 ` Tim Deegan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.