Fixed utcb updating issue that was a significant burden.

Any thread that touches a utcb inside the kernel now properly checks
whether the utcb is mapped on its owner, and whether the mapped physical
address matches that of the current thread's tables. If not the tables
are updated.

This way, even though page tables become incoherent on utcb address
change situations (such as fork() exit(), execve()) they get updated
as they are referenced.

Since mappings are added only conditionally, caches are flushed only
when an update is necessary.
This commit is contained in:
Bahadir Balban
2009-10-09 16:45:10 +03:00
parent a8a4b5ce6c
commit d39ffc6acd
6 changed files with 83 additions and 12 deletions

View File

@@ -44,6 +44,9 @@ int fileio(void)
if ((int)(cnt = read(fd, buf, strlen(str))) < 0) {
test_printf("READ: %d", errno);
goto out_err;
} else if (cnt != strlen(str)) {
test_printf("%d: Read: %d bytes from file.\n", tid, cnt);
goto out_err;
}
test_printf("%d: Read: %d bytes from file.\n", tid, cnt);