Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2012 08:06:33 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Markus Gebert <markus.gebert@hostpoint.ch>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: thread taskq / unp_gc() using 100% cpu and stalling unix socket IPC
Message-ID:  <6177E5C2-7FF6-42D7-B1E0-C09803BF6383@mu.org>
In-Reply-To: <4DDA6862-6BE5-4EF4-B6B5-141DD9123C36@hostpoint.ch>
References:  <6908B498-6978-4995-B081-8D504ECB5C0A@hostpoint.ch> <007F7A73-75F6-48A6-9C01-E7C179CDA48A@hostpoint.ch> <50A3104E.5000107@mu.org> <4DDA6862-6BE5-4EF4-B6B5-141DD9123C36@hostpoint.ch>

next in thread | previous in thread | raw e-mail | index | archive | help




On Nov 14, 2012, at 2:42 AM, Markus Gebert <markus.gebert@hostpoint.ch> wrot=
e:

>=20
> On 14.11.2012, at 04:30, Alfred Perlstein <bright@mu.org> wrote:
>=20
>> A couple of ideas:
>=20
> Thanks.
>=20
>> 1) convert the taskqueue to a callout, but only allow one to be queued at=
 a time.  set the granularity.
>=20
> I think Konstantin's patch is going in this direction.

Yes. Looks good.=20
>=20
>=20
>> 2) I think you only need to actually run garbage collection on the off-ch=
ance that you pass unix file descriptors, otherwise you can get away with re=
fcounting.
>=20
> Hm, isn't that whats done currently? gc is only scheduled if fds are infli=
ght while uipc_detach() is called.
>=20

It looks to me as if it runs the gc when ANY type are in flight.=20

If you added refcounting then you could trust the refcounting so long as no u=
nix sockets were in flight as its only the unix sockets that can cause cycle=
s in a refcount based graph.=20

>=20
>>  It's hard for me to express the exact logic needed for this though.  I t=
hink you would need some way to simply do refcounting until there was a unix=
 socket descriptor in flight, then switch to gc.   Either that or make a sys=
ctl that allows you administratively deny passing of unix descriptors and ju=
st use refcounting.
>=20
>=20
>=20
> Markus
>=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6177E5C2-7FF6-42D7-B1E0-C09803BF6383>