Avoid some unnecessary TLB flushes. This will probably make no real

difference on any sensible guest operating system.

Signed-off-by: Steven Smith, sos22@cl.cam.ac.uk.
This commit is contained in:
sos22@douglas.cl.cam.ac.uk committed 2005-07-15 09:24:29 +00:00
1 parent 6b2d3de1ce
commit 6a368fe8aa
1 file changed
+15 -11
+15 -11
View File
@@ -1352,18 +1352,22 @@ int get_page_type(struct pfn_info *page, u32 type)
{
if ( (x & (PGT_type_mask|PGT_va_mask)) != type )
{
/*
* On type change we check to flush stale TLB entries. This
* may be unnecessary (e.g., page was GDT/LDT) but those
* circumstances should be very rare.
*/
cpumask_t mask = page_get_owner(page)->cpumask;
tlbflush_filter(mask, page->tlbflush_timestamp);
if ( unlikely(!cpus_empty(mask)) )
if ( (x & PGT_type_mask) != (type & PGT_type_mask) )
{
perfc_incrc(need_flush_tlb_flush);
flush_tlb_mask(mask);
/*
* On type change we check to flush stale TLB
* entries. This may be unnecessary (e.g., page
* was GDT/LDT) but those circumstances should be
* very rare.
*/
cpumask_t mask = page_get_owner(page)->cpumask;
tlbflush_filter(mask, page->tlbflush_timestamp);
if ( unlikely(!cpus_empty(mask)) )
{
perfc_incrc(need_flush_tlb_flush);
flush_tlb_mask(mask);
}
}
/* We lose existing type, back pointer, and validity. */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.