FreeBSD 11 i386 disk deadlock (I think) (now with reproduction steps!)
Fabian Keil
freebsd-listen at fabiankeil.de
Mon Nov 28 16:49:31 UTC 2016
Konstantin Belousov <kostikbel at gmail.com> wrote:
> On Mon, Nov 28, 2016 at 02:43:30PM +0100, Fabian Keil wrote:
> > David Cross <dcrosstech at gmail.com> wrote:
> >
> > > This is certainly new behavior, or a new manifestation.
> >
> > Recently a couple of uma consumers were changed to share uma zones
> > instead of using a dedicated zone. As a result geli competes with
> > more uma consumers and is more likely to deadlock. The bug isn't
> > new, it's just triggered more often now.
> The problem happens on layer much lower than UMA, it is whole reusable
> page pool which is depleted and cannot be re-filled without allocating
> more memory. If you think about it, the deadlock is obviously trivial:
> pagedaemon is the main source of the free pages, but if producing free
> page requires allocating one, low memory condition is equal to deadlock.
>
> It was always there, in the sense that for all versions of freebsd, if
> file/disk write path requires memory allocation, there is the trouble.
>
> For geom, some special unique measures were taken so that bio allocations
> do not cause the issue in typical situations.
>
> > geli isn't the only uma consumer that is affected:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209680
It's been a couple of months since I looked into this and apparently
I misremembered.
The commits I was thinking of didn't actually modify UMA consumers to
use shared zones instead of dedicated zones but removed the UMA_ZONE_NOFREE
flag which makes issues like the one reported in the PR above more likely.
However, this should not negatively affect UMA consumers that use different
zones and should be unrelated to the geli deadlocks.
On my systems the patch from #209759 reliably prevents the geli deadlocks
when paging, but I do not remember why the issue became more pressing
recently.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20161128/4d435d3b/attachment.sig>
More information about the freebsd-hackers
mailing list