diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-12-17 17:21:17 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2011-07-18 18:43:27 -0400 |
commit | c2ba050d2e5638774571ea0ad0375a1c17c7b04e (patch) | |
tree | 3b90b1ee94de25e9d8a4ad2dab5fd7ca39db66ad /arch/x86/xen | |
parent | 847088079162a5cf8ab0d1ad1ecf7fa60c057246 (diff) |
xen/trace: add ptpage alloc/release tracepoints
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 43fa7771ccb9..f2160997287e 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1478,8 +1478,11 @@ static void __init xen_release_pmd_init(unsigned long pfn) | |||
1478 | static void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, unsigned level) | 1478 | static void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, unsigned level) |
1479 | { | 1479 | { |
1480 | struct page *page = pfn_to_page(pfn); | 1480 | struct page *page = pfn_to_page(pfn); |
1481 | int pinned = PagePinned(virt_to_page(mm->pgd)); | ||
1482 | |||
1483 | trace_xen_mmu_alloc_ptpage(mm, pfn, level, pinned); | ||
1481 | 1484 | ||
1482 | if (PagePinned(virt_to_page(mm->pgd))) { | 1485 | if (pinned) { |
1483 | SetPagePinned(page); | 1486 | SetPagePinned(page); |
1484 | 1487 | ||
1485 | if (!PageHighMem(page)) { | 1488 | if (!PageHighMem(page)) { |
@@ -1508,8 +1511,11 @@ static void xen_alloc_pmd(struct mm_struct *mm, unsigned long pfn) | |||
1508 | static void xen_release_ptpage(unsigned long pfn, unsigned level) | 1511 | static void xen_release_ptpage(unsigned long pfn, unsigned level) |
1509 | { | 1512 | { |
1510 | struct page *page = pfn_to_page(pfn); | 1513 | struct page *page = pfn_to_page(pfn); |
1514 | bool pinned = PagePinned(page); | ||
1511 | 1515 | ||
1512 | if (PagePinned(page)) { | 1516 | trace_xen_mmu_release_ptpage(pfn, level, pinned); |
1517 | |||
1518 | if (pinned) { | ||
1513 | if (!PageHighMem(page)) { | 1519 | if (!PageHighMem(page)) { |
1514 | if (level == PT_PTE && USE_SPLIT_PTLOCKS) | 1520 | if (level == PT_PTE && USE_SPLIT_PTLOCKS) |
1515 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); | 1521 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); |