Date: Sat, 23 Sep 2017 18:18:01 +0200 From: Andreas Longwitz <longwitz@incore.de> To: Don Lewis <truckman@FreeBSD.org> Cc: kostikbel@gmail.com, mckusick@mckusick.com, freebsd-fs@freebsd.org Subject: Re: fsync: giving up on dirty on ufs partitions running vfs_write_suspend() Message-ID: <59C68939.2040509@incore.de> In-Reply-To: <201709222220.v8MMKEW5085371@gw.catspoiler.org> References: <201709222220.v8MMKEW5085371@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59C68939.2040509>