On Tue, Dec 03, 2019 at 11:28:07PM +0100, Jarom?r Dole?ek wrote: > Le mar. 3 d?c. 2019 ? 18:59, Chuck Silvers <c...@chuq.com> a ?crit : > > > On Mon, Dec 02, 2019 at 07:10:52PM +0000, Andrew Doran wrote: > > > Hello, > > > > > > In light of the recent discussion, and having asked Jaromir his thoughts > > on > > > the subject, we both think it's time to enable this by default, so it > > gets > > > wider testing. Is there a good reason not to? > > > > > > Cheers, > > > Andrew > > > > The current ubc_direct code still has the problem that I pointed out > > originally, > > which is that it deadlocks if you read() or write() a page of a file into > > a mapping of itself. We should not enable this by default until that > > problem > > is fixed. > > > > Right, I completely forgot about this. > > I have a small program which triggers the deadlock quite reliably. Never > got around to actually add it into test suite because it caused problems > also on other system I run it on. > > Andrew, would you by chance be interested to look at this?
Yes I am, but I think it'll be next year some time if I do as there are more items on my list. Could you please send me the test program anyway? Incidentally I saw a thundering herd problem with this enabled (PG_WANTED vs. wakeup()). From a quick look it seems like more of a general UBC problem than a problem with ubc_direct but definitely something that needs looking into. It could be mitigated somewhat with wakeup_one() and associated changes but would be nice to address the root cause. This was actually kind of amusing to watch in top(1), I wish I had a video: http://www.netbsd.org/~ad/sh.txt Andrew