tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: vrele vs. syncer deadlock
On Thu, Dec 22, 2016 at 12:57:10PM +0100, J. Hannken-Illjes wrote:
> > On 11 Dec 2016, at 21:01, David Holland <dholland-tech%netbsd.org@localhost> wrote:
> >
> > On a low-memory machine Nick ran into the following deadlock:
> >
> > (a) rename -> vrele on child -> inactive -> truncate -> getblk ->
> > no memory in buffer pool -> wait for syncer
>
> This prediction seems wrong. It is not the syncers job to free
> memory to buffer pool - it will just update and write buffers
> ending up on one of the buffer queues.
>
> To release memory to the buffer pool the pagedaemon calls buf_drain()
> when it detects a low memory condition.
ok, but buf_drain doesn't write out buffers; only the syncer does
that. So if they're all dirty it won't do anything.
If anyone has a reliable way to reproduce this, adding a print in
buf_trim() when it can't get a buffer to drop might be useful.
(PR 51665 looks like another instance of this problem, but it might be
something different as it doesn't allow dropping into ddb.)
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index