diff options
author | Robert Morris <[email protected]> | 2020-10-04 09:21:03 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2020-10-05 19:30:27 -0400 |
commit | aeaf610c671dbf180fa276821aa8fc01b2461aef (patch) | |
tree | 10fc45c29d3a377a853d0a785d2057dbeba09ab2 /user | |
parent | 3c70be9070f0a8523e81733ce6f767315d7a7bf6 (diff) | |
download | xv6-labs-aeaf610c671dbf180fa276821aa8fc01b2461aef.tar.gz xv6-labs-aeaf610c671dbf180fa276821aa8fc01b2461aef.tar.bz2 xv6-labs-aeaf610c671dbf180fa276821aa8fc01b2461aef.zip |
avoid deadlock by disk intr acking interrupt first, then processing ring
Diffstat (limited to 'user')
-rw-r--r-- | user/usertests.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/user/usertests.c b/user/usertests.c index 720e3cf..ec6630d 100644 --- a/user/usertests.c +++ b/user/usertests.c @@ -1734,6 +1734,7 @@ void manywrites(char *s) { int nchildren = 4; + int howmany = 30; // increase to look for deadlock for(int ci = 0; ci < nchildren; ci++){ int pid = fork(); @@ -1749,7 +1750,7 @@ manywrites(char *s) name[2] = '\0'; unlink(name); - for(int iters = 0; iters < 500000; iters++){ + for(int iters = 0; iters < howmany; iters++){ for(int i = 0; i < ci+1; i++){ int fd = open(name, O_CREATE | O_RDWR); if(fd < 0){ @@ -1765,8 +1766,6 @@ manywrites(char *s) close(fd); } unlink(name); - if((iters % 50) == ci) - write(1, ".", 1); } unlink(name); @@ -2737,7 +2736,7 @@ main(int argc, char *argv[]) void (*f)(char *); char *s; } tests[] = { - // {manywrites, "manywrites"}, + {manywrites, "manywrites"}, {execout, "execout"}, {copyin, "copyin"}, {copyout, "copyout"}, |