Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142565176
D4280.id10555.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4280.id10555.diff
View Options
Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -1434,6 +1434,9 @@
sched_unpin();
}
+/* 512 PTEs */
+#define PMAP_INVLPG_THRESHOLD (512 * PAGE_SIZE)
+
void
pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
{
@@ -1441,6 +1444,11 @@
vm_offset_t addr;
u_int cpuid, i;
+ if (eva - sva >= PMAP_INVLPG_THRESHOLD) {
+ pmap_invalidate_all(pmap);
+ return;
+ }
+
if (pmap_type_guest(pmap)) {
pmap_invalidate_ept(pmap);
return;
Index: sys/i386/i386/pmap.c
===================================================================
--- sys/i386/i386/pmap.c
+++ sys/i386/i386/pmap.c
@@ -1016,6 +1016,9 @@
sched_unpin();
}
+/* 512 PTEs */
+#define PMAP_INVLPG_THRESHOLD (512 * PAGE_SIZE)
+
void
pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
{
@@ -1023,6 +1026,11 @@
vm_offset_t addr;
u_int cpuid;
+ if (eva - sva >= PMAP_INVLPG_THRESHOLD) {
+ pmap_invalidate_all(pmap);
+ return;
+ }
+
sched_pin();
if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) {
for (addr = sva; addr < eva; addr += PAGE_SIZE)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 1:52 AM (15 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27826350
Default Alt Text
D4280.id10555.diff (1 KB)
Attached To
Mode
D4280: pmap_invalidate_range: For very large ranges, flush the whole TLB
Attached
Detach File
Event Timeline
Log In to Comment