fsync: giving up on dirty on ufs partitions running vfs_write_suspend()
Andreas Longwitz
longwitz at incore.de
Sat Sep 23 16:18:16 UTC 2017
Don Lewis wrote:
>> Patch against HEAD:
>> --- vfs_default.c.orig 2017-09-22 11:56:26.950084000 +0200
>> +++ vfs_default.c 2017-09-22 11:58:33.211196000 +0200
>> @@ -690,6 +690,8 @@
>> bremfree(bp);
>> bawrite(bp);
>> }
>> + if( maxretry < 1000)
>> + DELAY(1000); /* 1 ms */
>> BO_LOCK(bo);
>> goto loop2;
>> }
>
> Do you need to use a busy loop here, or can you yield the cpu by using
> something like pause(9)?
>
No, I don't need a busy loop, it is even bad if we have only one CPU. I
have assumed that the person doing eventually a commit for this problem
will much better know than I how to wait 1 ms in the kernel.
I have repested my tests with "pause("dirty", hz/1000)" instead of
"DELAY(1000)" and got the same results in maximal loop numbers and spent
times as before.
--
Andreas Longwitz
More information about the freebsd-fs
mailing list