AMD IOMMU: implement lazy IO/TLB flushing

The IO/TLB flushing on every unmaping operation is the most expensive
part in AMD IOMMU code and not strictly necessary. It is sufficient to
do the flush before any entries are reused. This is patch implements
lazy IO/TLB flushing which does exactly this.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Joerg Roedel
2008-09-04 18:40:05 +02:00
committed by Ingo Molnar
parent 2842e5bf31
commit 1c65577398
3 changed files with 31 additions and 5 deletions

View File

@@ -995,6 +995,11 @@ int __init amd_iommu_init(void)
else
printk("disabled\n");
if (iommu_fullflush)
printk(KERN_INFO "AMD IOMMU: IO/TLB flush on unmap enabled\n");
else
printk(KERN_INFO "AMD IOMMU: Lazy IO/TLB flushing enabled\n");
out:
return ret;
@@ -1057,7 +1062,7 @@ void __init amd_iommu_detect(void)
static int __init parse_amd_iommu_options(char *str)
{
for (; *str; ++str) {
if (strcmp(str, "isolate") == 0)
if (strncmp(str, "isolate", 7) == 0)
amd_iommu_isolate = 1;
}