mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
[Mirror] Some kind of OS: git://git.9front.org/plan9front/plan9front
69e9efa847
When writing "refresh" control message to trigger garbage collection and there are other (query) processes active, the 9p loop would block until these processes complete. Instead, defer the garbage collection operation to these outstanding processes once any of them completes, keeping the 9p loop un-contended for longer. When theres no other processes, we can garbage collect ourselfs immediately (just as before). Only acquire the dnvars lock on Twrite, so we can handle other 9p requests while garbage collection is going on. Also reduce the 60 second timeout to 15 second for queries. Other dns servers usually use something between 10 and 30 seconds. Avoid excessive nsec() and time() calls by having timems() function that only uses nsec() and then updates global nowms (millisecons) and now (seconds) variable. After the end of readnet(), timems() needs to be called anyway to update the query statistics so we can use that as the new "now". |
||
---|---|---|
386 | ||
68000 | ||
68020 | ||
acme | ||
adm/timezone | ||
amd64 | ||
arm | ||
arm64 | ||
lib | ||
mips | ||
power | ||
power64 | ||
rc | ||
sparc | ||
sparc64 | ||
spim | ||
sys |