mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-18 00:29:31 +03:00
cope with backing store writeout making no progress
This commit is contained in:
parent
ba5ade87b2
commit
c9ee49baa8
@ -2411,7 +2411,10 @@ static void llcache_persist(void *p)
|
||||
/* obtained a candidate list, make each object persistant in turn */
|
||||
for (idx = 0; idx < lst_count; idx++) {
|
||||
ret = write_backing_store(lst[idx], &written, &elapsed);
|
||||
if (ret == NSERROR_OK) {
|
||||
if (ret != NSERROR_OK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* sucessfully wrote object to backing store */
|
||||
total_written += written;
|
||||
total_elapsed += elapsed;
|
||||
@ -2461,13 +2464,18 @@ static void llcache_persist(void *p)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
free(lst);
|
||||
|
||||
/* Completed list without running out of allowed bytes or time */
|
||||
if (idx == lst_count) {
|
||||
LOG(("Completed writeout list"));
|
||||
/* only reschedule if writing is making any progress at all */
|
||||
if (total_written > 0) {
|
||||
next = llcache->time_quantum - total_elapsed;
|
||||
} else {
|
||||
next = -1;
|
||||
}
|
||||
}
|
||||
|
||||
LOG(("writeout size:%d time:%d bandwidth:%dbytes/s",
|
||||
|
Loading…
Reference in New Issue
Block a user