* The fsync code was queueing an unlimited number of BUF/BIOs while
flushing a file, which creates a very large write burden on the
system, read stalls due to locked buffers, and can also blow out
things like dm_target_crypt which must allocate side-buffers for
the data.
* Fixes kmalloc exhaustion panics with dm_crypt.
* Improves read performance under heavy write loads (e.g. blogbench).
* B_LOCKED dirty buffers, so also wait for at least one running buffer
* to complete.
*/
-static __inline void
+void
waitrunningbufspace(void)
{
int limit = hirunningspace * 2 / 3;
bremfree(bp);
bawrite(bp);
}
+ waitrunningbufspace();
if (info->lazylimit && info->lazycount >= info->lazylimit)
error = 1;
else
void bufinit (void);
int bd_heatup (void);
void bd_wait (int count);
+void waitrunningbufspace(void);
int buf_dirty_count_severe (void);
int buf_runningbufspace_severe (void);
void initbufbio(struct buf *);