Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2019 19:05:07 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin <mav@FreeBSD.org>
Subject:   Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem
Message-ID:  <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--UjA9hsut7pP6HXGyYiI8hkW1DMFekAsUU
Content-Type: multipart/mixed; boundary="e5XAhQSTvMSs9v9w4opHL9AcywXVm0rTy";
 protected-headers="v1"
From: Lev Serebryakov <lev@FreeBSD.org>
Reply-To: lev@FreeBSD.org
To: freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org,
 Alexander Motin <mav@FreeBSD.org>
Message-ID: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org>
Subject: Commit r345200 (new ARC reclamation threads) looks suspicious to me -
 second potential problem

--e5XAhQSTvMSs9v9w4opHL9AcywXVm0rTy
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable


 I'm looking at last commit to
'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c' (r345200) and
have another question.

 Here are such code:

4960 	        /*
4961 	         * Kick off asynchronous kmem_reap()'s of all our caches.
4962 	         */
4963 	        arc_kmem_reap_soon();
4964 =09
4965 	        /*
4966 	         * Wait at least arc_kmem_cache_reap_retry_ms between
4967 	         * arc_kmem_reap_soon() calls. Without this check it is
possible to
4968 	         * end up in a situation where we spend lots of time reapin=
g
4969 	         * caches, while we're near arc_c_min.  Waiting here also
gives the
4970 	         * subsequent free memory check a chance of finding that th=
e
4971 	         * asynchronous reap has already freed enough memory, and
we don't
4972 	         * need to call arc_reduce_target_size().
4973 	         */
4974 	        delay((hz * arc_kmem_cache_reap_retry_ms + 999) / 1000);
4975 =09

 But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So,
this `delay()` looks very wrong. Am I right?

  Looks like it should be `#ifdef illumos`.

--=20
// Lev Serebryakov




--e5XAhQSTvMSs9v9w4opHL9AcywXVm0rTy--

--UjA9hsut7pP6HXGyYiI8hkW1DMFekAsUU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlzi0DNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5
NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c
R4/G2xAAgTzfzeDRycWw5jwlXWAJwExJh4ItBjDoWwe1U+1Yn0tcd+ZbsZX2iH2K
R6MJllylJlYF/VHc1Np022vViKrP0bj9vG26QsRjhXZSoGvBYf9exPEp7GMmO81b
U6Rm6JyUeuPvc19Kqusrk3FV2CWtu5dUqgp68n5cmujyztZLi1wobRapAHZ+YnrZ
SdwnAF28E9LucgNIb4obbe00gkRNlgfXMhMeVi7Q+If/FTJOApoB5dZRdqkv80DF
7wmRhd/423k3ETrkGbRkJNXkWM2jIU13WAbFLbgcDcHZptdePIA2vQ5/CL1W0yV7
1ShZIk3jLgSI/Ue55UpJkf6kgEhZ9v7fOUCNaN5+BhgEut+shVY+Yd7meii7+vsh
6rOVyuXuOoFZFqbkDSLxhLz/zF/zm3Ee9KTIC8WTyuGpHxtFWY6InJFXlZIoiV+A
6gHbYUoKpDOuSwjW+HsGrSEZfZVaH9PeRb7P8UUu6pcrU6UFJFvnX9zqrG/4Hrvi
NHCf8rweBnMUuimmeAa6H4kX7sOaK93azqLrk6wuSQYvZ69r8KIcsRKI6Up48rtn
pQgT8bJOG5z4Ayk/PYRcltmug/SCGJnf+dtEDgomLb+qsBUdpmP6j4a9Wcxo66pz
4xUmyU2KzqFmx7Gj2oswGTZk1QS+ONj5dhza0gt+gGZU0CFDaWU=
=V3Nd
-----END PGP SIGNATURE-----

--UjA9hsut7pP6HXGyYiI8hkW1DMFekAsUU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?369cb1e9-f36a-a558-6941-23b9b811825a>