Add inlines for demapping a range of pages from the itlb and dtlb. This
will be used to reduce the number of tlb shootdown ipis in an smp system by sending one ipi for a whole range of pages, instead of one per page. Munge the context demap operations slightly to support demapping a non-primary context.
This commit is contained in:
parent
9880a81276
commit
4d6fc96f19
@ -187,12 +187,10 @@ tlb_itlb_store(vm_offset_t va, u_long ctx, struct tte tte)
|
||||
}
|
||||
|
||||
static __inline void
|
||||
tlb_context_primary_demap(u_int tlb)
|
||||
tlb_context_demap(u_int context)
|
||||
{
|
||||
if (tlb & TLB_DTLB)
|
||||
tlb_dtlb_context_primary_demap();
|
||||
if (tlb & TLB_ITLB)
|
||||
tlb_itlb_context_primary_demap();
|
||||
tlb_dtlb_context_primary_demap();
|
||||
tlb_itlb_context_primary_demap();
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@ -216,6 +214,19 @@ tlb_page_demap(u_int tlb, u_int ctx, vm_offset_t va)
|
||||
tlb_itlb_page_demap(ctx, va);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
tlb_range_demap(u_int ctx, vm_offset_t start, vm_offset_t end)
|
||||
{
|
||||
for (; start < end; start += PAGE_SIZE)
|
||||
tlb_page_demap(TLB_DTLB | TLB_ITLB, ctx, start);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
tlb_tte_demap(struct tte tte, vm_offset_t va)
|
||||
{
|
||||
tlb_page_demap(TD_GET_TLB(tte.tte_data), TT_GET_CTX(tte.tte_tag), va);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
tlb_store(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user