Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2013 23:55:32 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        current@freebsd.org
Subject:   Re: sysvshm: replace Giant with a local sx lock
Message-ID:  <20130423205532.GE67273@kib.kiev.ua>
In-Reply-To: <20130423203823.GA6346@dft-labs.eu>
References:  <20130423203823.GA6346@dft-labs.eu>

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

--p1zxN+PsucbyOM2v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 23, 2013 at 10:38:23PM +0200, Mateusz Guzik wrote:
> Hello,
>=20
> I would like to replace Giant with a local sx lock in sysvshm code.
> Looked really straightforward so maybe I missed something.

At very least, the shmget_existing() is no longer functional.
The sx is owned around tsleep(), and thus a progress cannot be made
by other thread, which needs the same sx lock.

Use of the SHMSEG_REMOVED in the shmget_allocate_segment() does
not make any sense in your patch, since sleeping malloc allocation
owns sx and prevent other threads from finding the segment.

I did not looked further.

--p1zxN+PsucbyOM2v
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRdvVDAAoJEJDCuSvBvK1Bo7oQAJEBB6cUA37saerHX3lIIF18
en6+/VKbNLPybQiAwYuGSeq0U/t2gII/StjPXyBZYMSR6mXBbuxar0N/fyA+jcg4
BI26UM4fHP7k7CfYT6PLIoY/1kf6LIcsih7YwntuRkOgGjBLy+sT3H0p6QFOkW+I
gESpPJ03ns2U82nxzClJD2q2apsxicIzOfIH4Z2y2gx9Km7juA5D8xy602B8Klt6
FkXx5e9whC6anjDhQIItEH9MXomYINu3rUh+anhXnYUo/qBq8KsiDE5VfAQT+F0G
hIICpAZ+/nKx4XAht2u85poIP/NdP0jjROFbLNWzo+ztsiJB94rEq+pj0Fp+K7do
IUtlE2PcVbJjY+5oIiYlnLNmsy0DGRL8Vetg2fh+t+9DLiXEA0Eqx08Hs0amaovq
88JGSepuRTrntj9KOvC7jwIjTJnBHu6XbyJk94NC687/sEJrGJ7+Po8/ru7c3hlO
6VWEtVHqwufMsY1Ktq+y3ypH4FqBcaqxr+iV6h3YBTbPWFMzJ0NFBFdzu8QW5cv+
Kd5jvtpSLwN7mX/ro6X/vwjZ2Jh7hJzqXRcI1jXzhdt7gPQUyckVQ5OboYNkTNWG
/XN5eGY3Ka+jhYG87AqGTSw/6PHBMvb9UZSNTw/4p+HttJ9O6okeEPBhGRFed9EU
keCb3lobU+vDHVJUDIIY
=N6Qs
-----END PGP SIGNATURE-----

--p1zxN+PsucbyOM2v--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130423205532.GE67273>