From owner-freebsd-fs@freebsd.org Sun May 19 21:01:20 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9114015915F8 for ; Sun, 19 May 2019 21:01:20 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0CE745E9 for ; Sun, 19 May 2019 21:01:20 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id E302D15915F2; Sun, 19 May 2019 21:01:19 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE62715915F1 for ; Sun, 19 May 2019 21:01:19 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69488745DD for ; Sun, 19 May 2019 21:01:19 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id B004B1A115 for ; Sun, 19 May 2019 21:01:18 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4JL1Ivs080095 for ; Sun, 19 May 2019 21:01:18 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4JL1Ijo080094 for fs@FreeBSD.org; Sun, 19 May 2019 21:01:18 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201905192101.x4JL1Ijo080094@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: fs@FreeBSD.org Subject: Problem reports for fs@FreeBSD.org that need special attention Date: Sun, 19 May 2019 21:01:18 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 21:01:20 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- New | 203492 | mount_unionfs -o below causes panic Open | 144447 | [zfs] sharenfs fsunshare() & fsshare_main() non f Open | 211491 | System hangs after "Uptime" on reboot with ZFS Open | 221909 | [ZFS] Add a sysctl to toggle send_corrupt_data Open | 235665 | panic: handle_written_inodeblock: live inodedep Open | 237067 | ZFS: Crash in vdev_dtl_reassess when using GELI w 6 problems total for which you should take action. From owner-freebsd-fs@freebsd.org Mon May 20 11:25:49 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213BC15AA2C1 for ; Mon, 20 May 2019 11:25:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id ACD5671382 for ; Mon, 20 May 2019 11:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 681C415AA2BC; Mon, 20 May 2019 11:25:48 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5435515AA2BA for ; Mon, 20 May 2019 11:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCE9E71381 for ; Mon, 20 May 2019 11:25:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 0A8C91C90 for ; Mon, 20 May 2019 11:25:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KBPkd9050953 for ; Mon, 20 May 2019 11:25:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4KBPksp050951 for fs@FreeBSD.org; Mon, 20 May 2019 11:25:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Mon, 20 May 2019 11:25:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: Trond.Endrestol@ximalas.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 11:25:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 --- Comment #2 from Trond.Endrestol@ximalas.info --- Created attachment 204479 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204479&action= =3Dedit Patch for libexec/rc/rc.d/zfs making parallel mount optional Here's a half-baked solution to my dilemma. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Mon May 20 15:11:36 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6873615AF9EF for ; Mon, 20 May 2019 15:11:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id EEA47826F0 for ; Mon, 20 May 2019 15:11:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B2F9A15AF9EE; Mon, 20 May 2019 15:11:35 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A047515AF9ED for ; Mon, 20 May 2019 15:11:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A1EA826ED for ; Mon, 20 May 2019 15:11:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8A1363F92 for ; Mon, 20 May 2019 15:11:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4KFBYPG040608 for ; Mon, 20 May 2019 15:11:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4KFBY9p040598 for fs@FreeBSD.org; Mon, 20 May 2019 15:11:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Mon, 20 May 2019 15:11:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: Trond.Endrestol@ximalas.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 15:11:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 Trond.Endrestol@ximalas.info changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204479|0 |1 is obsolete| | --- Comment #3 from Trond.Endrestol@ximalas.info --- Created attachment 204484 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204484&action= =3Dedit Corrected patch for libexec/rc/rc.d/zfs making parallel mount optional Added the missing ]. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Mon May 20 15:38:22 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADF1215B06B3; Mon, 20 May 2019 15:38:22 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1639F8392F; Mon, 20 May 2019 15:38:22 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [148.251.9.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B605E1CE0A; Mon, 20 May 2019 15:38:21 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 96B86186AD; Mon, 20 May 2019 18:38:19 +0300 (MSK) To: freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Reply-To: lev@FreeBSD.org From: Lev Serebryakov Subject: Commit r345200 (new ARC reclamation threads) looks suspicious to me. Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFKbGksBEADeguVs+XyJc3mL3ii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Lj7v0ck06rEo4yiXT/ZAcBM76j7V7FaGbkoba6bUU CQ2H5YYBOKpikjCnpwARAQABiQI8BBgBCAAmAhsMFiEE+W0coLX0MYtnSzMK6rA8WL/cR48F Alv9N7IFCQ8Ft+cACgkQ6rA8WL/cR49wpw//W7QrZHKYUWEVHtPLVMlcM1f7MgwnYlIRe/I6 gykwvt87sqxSYu7eHxfX6JZR2M9UYuUYscSR57gxXKu2Uzqaz2KjvEIXJCwCTsuXZjkQ19oL hAPsucw2AcMI6YqPXbZ7hO0Mh8jMeJzD6vDvx3zvunQxGQoZKxr3BvRUyO7NCYbA7N8ccI3E Tmdjj9JTbtue9WaUeGLszFDiITmkASBdsK07y4ylLAJzUGCvYLBU3gx0bBOB2S8SbxHYmQlj ewjovbp+MbT+CoXNxZp+gDRModGyIMdRIotkRiDbgNl0VWIT0SS1GUUlUHKzQ/ZPUvpvk6Gq s/SYBS7rBQNSoXXmJxNW6I6atVNW7JhInC1tkHxBlbpik4FK07J6NHFTx+9ygyCxbxwNA/Le FGkL3kU0VFXR2dNiAVbeueUPF6tU5Bye5ftgpLKOSAbo1g++EKUkc8335/4oYRBMcGEk4xUr NAvzoFPhA2W3KtklruJ9ThrFt9+//NB5ySlVgTwGWMuBJoskEmNOTBv34/UQPUIuE4xSwy6y H+nRQJooiMFo5QCosslJPlwyV63NS9lYXB6n3QWOCP6sFdWACNUCOFv4uk7LQdY9BsCmt2Tk cLuHmoS+fvUesQXnYV2aQi9HciriPIj2gvJ6WjgiaC/PpePil0fzyrfG/JMyHL0qcgmYoj0= Organization: FreeBSD Message-ID: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> Date: Mon, 20 May 2019 18:38:07 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2otz2YBkNKpHdJOidjhGzRvIgUzq6EAGT" X-Rspamd-Queue-Id: 1639F8392F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 15:38:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2otz2YBkNKpHdJOidjhGzRvIgUzq6EAGT Content-Type: multipart/mixed; boundary="vr8o0Z3UyUbX9pqkufPdmsagmN2NSX6yY"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Message-ID: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> Subject: Commit r345200 (new ARC reclamation threads) looks suspicious to me. --vr8o0Z3UyUbX9pqkufPdmsagmN2NSX6yY 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 one question. Is it Ok for two threads to communicate via simple global variable? Now new code has (line 315): static boolean_t arc_adjust_needed =3D B_FALSE; And after that some threads run code like this: mutex_enter(&arc_adjust_lock); arc_adjust_needed =3D B_TRUE; mutex_exit(&arc_adjust_lock); zthr_wakeup(arc_adjust_zthr); And thread `arc_adjust_zthr` has code like this (line 4874): return (arc_adjust_needed); This variable is not atomic. It is not updated and/or read in atomic way. What code gives guarantees that `arc_adjust_zthr` will detect this change? I don't see any. Am I wrong? --=20 // Lev Serebryakov --vr8o0Z3UyUbX9pqkufPdmsagmN2NSX6yY-- --2otz2YBkNKpHdJOidjhGzRvIgUzq6EAGT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlziyd9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c R48yvxAApPXpt46m0ejunWWcU6ul4k4m+c0UvPn3AbQuS6DB1gHcAY4lOyTe0XTy xOsl3JJD3CYyK3IGjFt29WqrPSbZzRGR7Jxew/mS9alJztElkCVGfPZccJkf2sJo WxBwJAv0zERVJM6tlml3E+8gjS0IJje0Own2zSHUOorv6c+uXQhQQTC1G+EYdEnY lmghAf105yi8ur0HSCadp0jSlGZ+RWLc/RDldQMCPnNdLLl8xKjAxnaOSCPsaOXn vDZ5OWinQBtCQtMk4eBhFxXhWiBUzOEYMYYy6PJWfmVMfsIodrx8Vakx2J4GeVXl lLPuvc0Xiftp94ya6C7FdIUiuxktDixo0571EFMNQqUrJTxTAVOtKkCC4KCzEnZt Eb3f8Uk0Mrdn2GW0ML/0Dr0jzXw6SzyaApsH9LO1twCAtVj6VTGJA1j9yTHljbeS D7CusKEETGuE8/We/ni7V7x2sLAsXH5HyLBdYVwNRGRLFWdEIINH6yNZnHS893+K ZzWLWfnsOHPXyLNcoLtNiXKnvVS1cLDlOzGcMBG0MvGY1ua0An7r2RYX2HdJhbw2 GIgNu/hiG9v/v91RazB9rZvNijAk7QBasf14qsnFQg9hDp6QSXyGQjXFxOkJC1Pr 3UzrtIpEgpZ8Ls+uQtFOT+vZJEBQNNuZ5d7H4vbU2lUj7LajMJw= =176T -----END PGP SIGNATURE----- --2otz2YBkNKpHdJOidjhGzRvIgUzq6EAGT-- From owner-freebsd-fs@freebsd.org Mon May 20 16:05:13 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1701015B135F; Mon, 20 May 2019 16:05:13 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFC984C62; Mon, 20 May 2019 16:05:12 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [IPv6:2a01:4f8:201:6350::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 11C611D185; Mon, 20 May 2019 16:05:12 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id A215C186C0; Mon, 20 May 2019 19:05:07 +0300 (MSK) From: Lev Serebryakov Subject: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Reply-To: lev@FreeBSD.org To: freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFKbGksBEADeguVs+XyJc3mL3iiOBqDd16wSk97YTJYOi4VsHsINzJr09oFvNDiaDBIi fLn2p8XcJvehcsF2GSgrfXfw+uK4O1jyNIKJmiYA0Et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EE+W0coLX0MYtnSzMK6rA8WL/cR48F Alv9N7IFCQ8Ft+cACgkQ6rA8WL/cR49wpw//W7QrZHKYUWEVHtPLVMlcM1f7MgwnYlIRe/I6 gykwvt87sqxSYu7eHxfX6JZR2M9UYuUYscSR57gxXKu2Uzqaz2KjvEIXJCwCTsuXZjkQ19oL hAPsucw2AcMI6YqPXbZ7hO0Mh8jMeJzD6vDvx3zvunQxGQoZKxr3BvRUyO7NCYbA7N8ccI3E Tmdjj9JTbtue9WaUeGLszFDiITmkASBdsK07y4ylLAJzUGCvYLBU3gx0bBOB2S8SbxHYmQlj ewjovbp+MbT+CoXNxZp+gDRModGyIMdRIotkRiDbgNl0VWIT0SS1GUUlUHKzQ/ZPUvpvk6Gq s/SYBS7rBQNSoXXmJxNW6I6atVNW7JhInC1tkHxBlbpik4FK07J6NHFTx+9ygyCxbxwNA/Le FGkL3kU0VFXR2dNiAVbeueUPF6tU5Bye5ftgpLKOSAbo1g++EKUkc8335/4oYRBMcGEk4xUr NAvzoFPhA2W3KtklruJ9ThrFt9+//NB5ySlVgTwGWMuBJoskEmNOTBv34/UQPUIuE4xSwy6y H+nRQJooiMFo5QCosslJPlwyV63NS9lYXB6n3QWOCP6sFdWACNUCOFv4uk7LQdY9BsCmt2Tk cLuHmoS+fvUesQXnYV2aQi9HciriPIj2gvJ6WjgiaC/PpePil0fzyrfG/JMyHL0qcgmYoj0= Organization: FreeBSD Message-ID: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> Date: Mon, 20 May 2019 19:05:07 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UjA9hsut7pP6HXGyYiI8hkW1DMFekAsUU" X-Rspamd-Queue-Id: 4BFC984C62 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:05:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UjA9hsut7pP6HXGyYiI8hkW1DMFekAsUU Content-Type: multipart/mixed; boundary="e5XAhQSTvMSs9v9w4opHL9AcywXVm0rTy"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin 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-- From owner-freebsd-fs@freebsd.org Mon May 20 16:20:50 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6610115B1A61 for ; Mon, 20 May 2019 16:20:50 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D80028553C for ; Mon, 20 May 2019 16:20:49 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558369248; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Q9C2yE1DEzEvavTiBes2JrWahNX0QLReE2+opnzWhvabcjqsA74tfyXOvCjZCRWuZ2H0ypcJx9C6+ YcJ7qNT+rqFla7FN6mAWUqBtiC97KvHumZLgwtOLM3KxuAfzN5kkjsOHScRt/8yeJLfNF2u8QIpCNA jbqrl/KCzNgICN14mZPQUomGYLEXTeFxCrKlJI24ehngyTxveWo2+oi0wPLHEMglDc5T874A3vH8vk IiWoF5e4ObnfG6tKZYdvKJFoeGgRF+eCzr6V9KAh1dCLUaOUA+BKVCfv01GhJs7YnxNNlgQ1NKZOXw iUwoJ2LoqM7CVbG84eKpBzh/bjiQsPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=14WWBiocjAfZezhw4SrVUMCriDCHv4r+HKSo15KGdrU=; b=eCTrHMq0E/LtUYHSn6LxMtQiMtM08MFqk4WO4exec+ZRmtDyPPTt2OR5V+4giEpHo9g4EasGfg+Tw 4rHEtuaX+FIDMXj5UDe7WXy66SYd1tc3rn4n+B7cDisIj37que2TBB0H3laGrX4gE3D0xSbHhtDx7F A9UO/Ry1Cy6joEnuV+GvD3Yq88dGn99jJAWGFtJsW1XZpbXDnFRgsLRHLDT++2fst8jZtWVmgU6FsE E04dpdlIeh+DqTzBEZaTeabr1scHniIzg+IKWtmWRbMYkiejjRiRMy+0tjmeHSpKY/w6d88wipzRR5 iwvVvOmbDj80Ng9WYzJkpCRyvfwMYIw== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=14WWBiocjAfZezhw4SrVUMCriDCHv4r+HKSo15KGdrU=; b=ivBKPH9aqOmJMPFFMPcI8Io7zf7sgyitKeU07IiLIIxN1j4aah9/1WllZynxeXSRZNAFEwwJCkDlq d5PzJLPJGvtjS3UKFoPkXmre60XkPwIu9AeQSY36WzcpvWtaQL49zQcesirU/wT1n8yfJpXLIJObaI gPpsuVlJsuPphe8z4P6MIy7zZqF2ZIfZ4V/nt+GmGhLUCkEMkHGB1I2bUCctdq1UItsaJatgnVL+m/ 7Mg59qDwn0M5jWd9QdHV9kL0b1nZ24y2/JD14HqPGV5tY05sGUMOx62UqTrUHap+OU/8O2LrQlXNGs VBX+YlZDxTxqaGxuIhl1LD5mvUtXFqw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 38f03783-7b1b-11e9-990f-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 38f03783-7b1b-11e9-990f-673a89bc4518; Mon, 20 May 2019 16:20:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4KGKjFw024929; Mon, 20 May 2019 10:20:45 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <8160c9149c04d2b622292abf582bcbb9a541d2ed.camel@freebsd.org> Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem From: Ian Lepore To: lev@FreeBSD.org, freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Date: Mon, 20 May 2019 10:20:45 -0600 In-Reply-To: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D80028553C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:20:50 -0000 On Mon, 2019-05-20 at 19:05 +0300, Lev Serebryakov wrote: > 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 > 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 > reaping > 4969 * caches, while we're near arc_c_min. Waiting here > also > gives the > 4970 * subsequent free memory check a chance of finding > that the > 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 > > 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`. > One of the things arc_kmem_reap_soon() does is call dnlc_reduce_cache(), and that sets a variable and does a condition variable broadcast, presumably causing other threads to wake up and do some work. So, presumably the delay (which appears to really be a call to pause(9) on freebsd) allows time for that async work to happen before calling arc_available_memory(). -- Ian From owner-freebsd-fs@freebsd.org Mon May 20 16:26:32 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0F7315B1CA0 for ; Mon, 20 May 2019 16:26:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F311985ADE for ; Mon, 20 May 2019 16:26:30 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1558368621; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=hCxZoBzJT19drGZsCQrrZcdsR9LZaO3nSlL5Ss/c12MrntcF+skjS1jF0Iw5GxakSbcXy4DvJCJXj 8MN/J96Q8Z/lI9CHbm0XTt9rF6mTXhVwzeE5br3RF7+kUx/piJKfqBNcI0LGoMbzMB5Qu+bhdwZP0n AKpXGiTpWWzHHOPl8DoNXaI/qCqg2Dbax2IVVdg7Nm9IXLXR8xMLXcmlXcDWJfsRKY+MAH/Wu4Vnwz nt+YH31Mh3b3HRNuVt496b/imZt32B/QvKpmC/0RukWVg879eEgxl/XLyFWiIVZOLU70EQaouEGeDZ VWfYLxHvEXLHzA7v3jqNbPYKNJj2yPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=O2Lw82ky9ld8ggooTZudj58wNggpWoWPWmDaXwDYlV8=; b=SLU8L7DG8aH7yXt3WEhp8g4eqBTjW59zHa7h4TQ7Qawz4spt8AmERzWL3VFcXYReL97W0lx6Rn2KC z5eD269SN4JwI8nBgHlZ1dfRbY/R0nqO3Eg5OA8/WNlGvXWKeGSvLX9Gwfq2b0jJCbc7mRo+/r1LSq vE/whgRiBRwDWsxmbzd9/RNW+jba034fbDuEXraopK+x9Kq/xIpUW3ylwz8o4tqMUbn4+JuoTlaZci BomvFcUg6zNImw7BEIZ2JSfO044jVwyxaPEp2tcphMFJ2kauvuUmkQpANuRbzPN006IWERVSWy9xH4 1JGrPxPNriKSB8lDBGr+xqmmWIWBwSQ== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=O2Lw82ky9ld8ggooTZudj58wNggpWoWPWmDaXwDYlV8=; b=LB15JlqGEc/hcNz0vk6EIORpLacFWT1Vkh+sVi3mTsYV2YHGAm57MJWWpjXsGynyMz7vrOyxekuCf F73Rq1H58IovPO3mO86Q/EMv02YAWsfU0iJX2S4UvvUaohSs8dYxgeCV8yZdFmW2zEhgl2B7j854Ub FEmKI5c5SThbhJnXuzDevUB510hujF1Cr2qVBejnOjM3bHZzBRnIZGlbYjk7WjMRv8HolOIxLwwLg/ 4rFd53zOpR7rR8vXjzfAubqAKhxGdwl2fd3qpew08sE45dDalnuNMpDle7ezbPHY8xwEBnPCK8WZmi 3P9arKYh/gVq1K9PsQ8aeC315GG5EUA== X-MHO-RoutePath: aGlwcGll X-MHO-User: c1ac49d9-7b19-11e9-85c6-c97e5c048ed3 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id c1ac49d9-7b19-11e9-85c6-c97e5c048ed3; Mon, 20 May 2019 16:10:18 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x4KGAGjq024895; Mon, 20 May 2019 10:10:16 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <174f71126ca39907370a8904c07546b712ad91b9.camel@freebsd.org> Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me. From: Ian Lepore To: lev@FreeBSD.org, freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Date: Mon, 20 May 2019 10:10:16 -0600 In-Reply-To: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> References: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: F311985ADE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:16509, ipnet:52.58.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:26:32 -0000 On Mon, 2019-05-20 at 18:38 +0300, Lev Serebryakov wrote: > I'm looking at last commit to > 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c' (r345200) and > have one question. > > Is it Ok for two threads to communicate via simple global variable? > Now > new code has (line 315): > > static boolean_t arc_adjust_needed = B_FALSE; > > And after that some threads run code like this: > > mutex_enter(&arc_adjust_lock); > arc_adjust_needed = B_TRUE; > mutex_exit(&arc_adjust_lock); > zthr_wakeup(arc_adjust_zthr); > > And thread `arc_adjust_zthr` has code like this (line 4874): > > return (arc_adjust_needed); > > This variable is not atomic. It is not updated and/or read in atomic > way. What code gives guarantees that `arc_adjust_zthr` will detect > this > change? I don't see any. Am I wrong? The arc_adjust_needed variable is the gating condition associated with a condition variable and lock. It is only read or changed while holding a lock, and the acquiring and releasing of that lock provides the needed memory barriers. In this case, the association with the condition variable and lock is somewhat obscured by the way the zthread timer stuff works. The arc_adjust_cb_check() function is called from line 193 of contrib/opensolaris/uts/common/fs/zfs/zthr.c, and that's where you'll find the code that makes it clear this is an idiomatic condition variable pattern. -- Ian From owner-freebsd-fs@freebsd.org Mon May 20 16:40:26 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80C8E15B2892; Mon, 20 May 2019 16:40:26 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2016786C18; Mon, 20 May 2019 16:40:25 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hSlKg-00010C-GH; Mon, 20 May 2019 19:40:14 +0300 Date: Mon, 20 May 2019 19:40:14 +0300 From: Slawa Olhovchenkov To: Ian Lepore Cc: lev@FreeBSD.org, freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Message-ID: <20190520164014.GA47119@zxy.spb.ru> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <8160c9149c04d2b622292abf582bcbb9a541d2ed.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8160c9149c04d2b622292abf582bcbb9a541d2ed.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 2016786C18 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.57 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.91)[0.909,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.88)[0.885,0]; IP_SCORE(0.00)[country: RU(0.01)]; MX_GOOD(-0.01)[zxy.spb.ru]; NEURAL_SPAM_LONG(0.88)[0.882,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:40:26 -0000 On Mon, May 20, 2019 at 10:20:45AM -0600, Ian Lepore wrote: > On Mon, 2019-05-20 at 19:05 +0300, Lev Serebryakov wrote: > > 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 > > 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 > > reaping > > 4969 * caches, while we're near arc_c_min. Waiting here > > also > > gives the > > 4970 * subsequent free memory check a chance of finding > > that the > > 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 > > > > 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`. > > > > One of the things arc_kmem_reap_soon() does is call > dnlc_reduce_cache(), and that sets a variable and does a condition > variable broadcast, presumably causing other threads to wake up and do > some work. So, presumably the delay (which appears to really be a call > to pause(9) on freebsd) allows time for that async work to happen > before calling arc_available_memory(). This call perform before any kmem reap and only conditional by arc_meta_used>=arc_meta_limit. In any way kmem reap is very long operation, longest any work in arc_dnlc_evicts_thread() (vnlru_free()). From owner-freebsd-fs@freebsd.org Mon May 20 16:42:19 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EA4D15B2B82; Mon, 20 May 2019 16:42:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x12a.google.com (mail-it1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EE2B86F8C; Mon, 20 May 2019 16:42:17 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x12a.google.com with SMTP id u186so92281ith.0; Mon, 20 May 2019 09:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QVS3wROcc8DYEgTWE7PfKECHg+AqAwGpqSkoKJAOa5E=; b=tIi4z9qU3Tq3ZIOa36yVNjt1/57wHHEGfIAqwYqw1Gq9FNMdrllKYU411KOBfNxLt1 aBH0EJc6NyaEhOcEc5wryX2sB0nnLwyt4hJXgDNQv/GYcKNncZv8BhPerByx6Y4ENlsd MW43YvKakTuinpjgiOqCDqJyKNeVgiuIscnGe8oKUm+XY8ZOxEDlFWIBi4BgiSxbzsoQ j38T7FGI9yMISCQ9159D8etaT1zGLL10rJX+q51t+b8sDWmJ+iPZ81dDYCaibArUCd8k jcrPsK+7N5VKWrol+nCnbjJzIpkI1r4k/hzRssvBkwo22zUM+O7lLIXVhQmBKpftZ2jM 49tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QVS3wROcc8DYEgTWE7PfKECHg+AqAwGpqSkoKJAOa5E=; b=sYsp+yRoAdNW6aiskyfkyIscIs+ySMZF5j0A8iAjRpsb/9RULfeX0KOnet8tYNizz+ LCAWHPGeT0kw+qT3nkiFnqWzaw7Zd8YZfk7vyEX8HpdiI+j56xOVfQFPqC9UX5z8qW3x aUuGV11eRp3PJq9lhItd8ICViQDxqxuKgs5N+c1hsfqlzGvNH3f/hF0MLB6CZRztMUhG LrMsSCusyYW6O3HAeYT61Ugrk3rzTZiMQpEKf6Fs3DiYBShpdTb5OkA7uwKDSGStkL+I DawiGa8ovzrhldnilyE9a+7gmYCb6cRJHakOdlGoNsX7K+cyWd8Dbeyv1zrDQD7e6EBf D0uA== X-Gm-Message-State: APjAAAU/w8Hs6mR0fiT9fz1CFJyC9xd9XEQqmEGEOyqoFjEkxvcDDQgN VdJKK3qfAvHK96NBlcELACHFLmUs X-Google-Smtp-Source: APXvYqwO/W5mLHxeVKGJO7kzfXvs1W0R168nrcWkPols5PYThHq8ue0xo/xOj2+cZGEm+OHwkAG0YA== X-Received: by 2002:a02:b707:: with SMTP id g7mr3354030jam.23.1558370536434; Mon, 20 May 2019 09:42:16 -0700 (PDT) Received: from spy (cs-auth-dc-129-97-60-193.dynamic.uwaterloo.ca. [129.97.60.193]) by smtp.gmail.com with ESMTPSA id l136sm16247itc.23.2019.05.20.09.42.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 May 2019 09:42:14 -0700 (PDT) Sender: Mark Johnston Date: Mon, 20 May 2019 12:42:10 -0400 From: Mark Johnston To: Lev Serebryakov Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Message-ID: <20190520164202.GA2130@spy> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 9EE2B86F8C X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tIi4z9qU; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::12a as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-5.49 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.79)[ip: (-8.38), ipnet: 2607:f8b0::/32(-3.25), asn: 15169(-2.26), country: US(-0.06)]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[a.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 16:42:19 -0000 On Mon, May 20, 2019 at 07:05:07PM +0300, Lev Serebryakov wrote: > > 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 > 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 reaping > 4969 * caches, while we're near arc_c_min. Waiting here also > gives the > 4970 * subsequent free memory check a chance of finding that the > 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 > > 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`. See also r338142, which I believe was reverted by the update. From owner-freebsd-fs@freebsd.org Mon May 20 17:14:40 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59AA115B3674; Mon, 20 May 2019 17:14:40 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFA128865B; Mon, 20 May 2019 17:14:39 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [IPv6:2a01:4f8:201:6350::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 986D51D9CC; Mon, 20 May 2019 17:14:39 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 68C20186F6; Mon, 20 May 2019 20:14:37 +0300 (MSK) Reply-To: lev@FreeBSD.org Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me. To: Ian Lepore , freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin References: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> <174f71126ca39907370a8904c07546b712ad91b9.camel@freebsd.org> From: Lev Serebryakov Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFKbGksBEADeguVs+XyJc3mL3iiOBqDd16wSk97YTJYOi4VsHsINzJr09oFvNDiaDBIi fLn2p8XcJvehcsF2GSgrfXfw+uK4O1jyNIKJmiYA0EtE+ZbRtvDrrE0w6Q8+SDeKA21SWh3Y vSQ0DJUontbgW55ER2CbEiIUTIn34uQ0kmESAaw/v5p/9ue8yPTmURvv130FqPFz8VPzltqL NxyGt54TxPfKAzAHEIwxlEZ63JOwzloKh1UDBEx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SR57gxXKu2Uzqaz2KjvEIXJCwCTsuXZjkQ19oL hAPsucw2AcMI6YqPXbZ7hO0Mh8jMeJzD6vDvx3zvunQxGQoZKxr3BvRUyO7NCYbA7N8ccI3E Tmdjj9JTbtue9WaUeGLszFDiITmkASBdsK07y4ylLAJzUGCvYLBU3gx0bBOB2S8SbxHYmQlj ewjovbp+MbT+CoXNxZp+gDRModGyIMdRIotkRiDbgNl0VWIT0SS1GUUlUHKzQ/ZPUvpvk6Gq s/SYBS7rBQNSoXXmJxNW6I6atVNW7JhInC1tkHxBlbpik4FK07J6NHFTx+9ygyCxbxwNA/Le FGkL3kU0VFXR2dNiAVbeueUPF6tU5Bye5ftgpLKOSAbo1g++EKUkc8335/4oYRBMcGEk4xUr NAvzoFPhA2W3KtklruJ9ThrFt9+//NB5ySlVgTwGWMuBJoskEmNOTBv34/UQPUIuE4xSwy6y H+nRQJooiMFo5QCosslJPlwyV63NS9lYXB6n3QWOCP6sFdWACNUCOFv4uk7LQdY9BsCmt2Tk cLuHmoS+fvUesQXnYV2aQi9HciriPIj2gvJ6WjgiaC/PpePil0fzyrfG/JMyHL0qcgmYoj0= Organization: FreeBSD Message-ID: Date: Mon, 20 May 2019 20:14:31 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <174f71126ca39907370a8904c07546b712ad91b9.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tMa0gZRrxl7pCAF587GN3CtCFfW54v7kb" X-Rspamd-Queue-Id: DFA128865B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2019 17:14:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tMa0gZRrxl7pCAF587GN3CtCFfW54v7kb Content-Type: multipart/mixed; boundary="n1o4LvrciTjF6iW6sioyfJbmdqP5wRYyf"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: Ian Lepore , freebsd-fs@freebsd.org, freebsd-hackers@FreeBSD.org, Alexander Motin Message-ID: Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me. References: <55989579-a228-498e-2842-453cad6f315f@FreeBSD.org> <174f71126ca39907370a8904c07546b712ad91b9.camel@freebsd.org> In-Reply-To: <174f71126ca39907370a8904c07546b712ad91b9.camel@freebsd.org> --n1o4LvrciTjF6iW6sioyfJbmdqP5wRYyf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 20.05.2019 19:10, Ian Lepore wrote: > The arc_adjust_needed variable is the gating condition associated with > a condition variable and lock. It is only read or changed while > holding a lock, and the acquiring and releasing of that lock provides > the needed memory barriers. In this case, the association with the > condition variable and lock is somewhat obscured by the way the zthread= > timer stuff works. The arc_adjust_cb_check() function is called from > line 193 of contrib/opensolaris/uts/common/fs/zfs/zthr.c, and that's > where you'll find the code that makes it clear this is an idiomatic > condition variable pattern. Oh, I see now. Right. Thank you for explanation. --=20 // Lev Serebryakov --n1o4LvrciTjF6iW6sioyfJbmdqP5wRYyf-- --tMa0gZRrxl7pCAF587GN3CtCFfW54v7kb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlzi4HdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c R49AiA//UnGRvpmcwtG8U2Fxl4bv5CsaIKS1KPCtArSrAfIFQzJeDIeZA77NJ2a1 JCE6FdcgtdIYmPJNQ9AIgr5Nd/xArlnX52ATjRLeAYQYAVB+q3skkZ3p4DveXFEZ sNkz0D9KrpirdILa4crzv5AvIDYfKomHifWuYRb2aLUVZ7uSCeVLB1mRYlTxVQhx usyukK8gGqyWmLDOE0fIV3V1lZn9HL1QDndowsaJEk2LrtR6H5mT62cT9bJ0QDqD SNUS1aEpNVZboh4uscrZdUZMPv77kZsH41r4S7yvfVwqYkhQctJ/iBvwFa0UNUW5 h4mrwB6VlEcWxv0AQ1DjNEbYoGsLM7gJRJ2pTftO/i1wStjZt/W8X6SSzyvJaujr J4878PHwl0N+YKBcfe361u7V7oLBy6SAB4I6AMcDBZQyNePJXWxSuagL8pUKlqGp D9VlOeCzuSwRci43OnnWMNA+rvyNfRwFc5iQNv0ick2gqqrun0cErTrE8YVdtAbC NwZAl481F1mPTBtiqGnDbnbr90uO0VxQfo/S8H54KR6i+Ptx9NjfogpKmqfQKlis zpzLm9VSD0uyyGjoE2FgemKZXc2jLjuy+00NUVRoE9J6ItnSkvVLzMINQWjy4ubd ue+IQvnL3Iz3dlU1cblFL6aYqLNfEcKprT6UKIcQmMHOsnYj2mc= =ykE3 -----END PGP SIGNATURE----- --tMa0gZRrxl7pCAF587GN3CtCFfW54v7kb-- From owner-freebsd-fs@freebsd.org Tue May 21 09:29:12 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A2E815A8295 for ; Tue, 21 May 2019 09:29:12 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (unknown [IPv6:2001:19f0:5801:ebe:d87d:d822:b408:4936]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83A0185B3D for ; Tue, 21 May 2019 09:29:11 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp59-167-167-3.static.internode.on.net [59.167.167.3]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id x4L9SPpf044157 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2019 19:28:31 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id x4L9SJxd044004 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 May 2019 19:28:19 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id x4L9SJem044003; Tue, 21 May 2019 19:28:19 +1000 (AEST) (envelope-from peter) Date: Tue, 21 May 2019 19:28:19 +1000 From: Peter Jeremy To: Peter Cc: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-fs@freebsd.org Subject: Re: Waht is the minimum free space ... (Full Report) Message-ID: <20190521092819.GB41934@server.rulingia.com> References: <20190515204243.GA67445@gate.oper.dinoex.org> <60d57363-eb5c-e985-82ad-30f03b06a4c6@quip.cz> <20190517010239.GA34758@gate.oper.dinoex.org> <20190517053043.GF98005@server.rulingia.com> <20190517124937.GA11835@gate.oper.dinoex.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <20190517124937.GA11835@gate.oper.dinoex.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 09:29:12 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-May-17 14:49:37 +0200, Peter wrote: >On Fri, May 17, 2019 at 03:30:43PM +1000, Peter Jeremy wrote: >! On 2019-May-17 03:02:39 +0200, Peter wrote: >! >The original idea was to check if ZFS can grow a raid5. >!=20 >! I've done this (see https://bugs.au.freebsd.org/dokuwiki/zfsraid), thoug= h I >! also migrated from RAIDZ1 to RAIDZ2 in the process. If this process no >! longer works (that page is 4 years old), it would seem that there has be= en >! an unfortunate regression. > >You don't mention setting "autoexpand=3Don" - I suppose it would not >work without that. Hmmm... After all this time, I don't recall. I did an export/import, in which case, I don't believe autoexpand is necessary. >What we have here is most likely not a problem with the raid or it's >growth, but a kind of "autority conflict" between ZFS and GPT on who >is going to manage the underlying partitions. (Which doesn't surprize >me - if I were ZFS, I would be quite frustrated to run under GPT.) I don't agree with this. Geom is layered - by definition, a geom partition manager class (eg BSD, GPT) is responsible for managing the partition layout. ZFS can only see exposed device entries - which means either entire raw disks or the partitions exposed via geom. If ZFS tries to access data outside the partition it is using then it should receive an error back (or there's a serious bug in geom). When juggling disk partitions, the most common problem is unexpected metadata: Both geom and ZFS store metadata at the edges of the containers they live in (disks or partitions). Using gpart to resize a partition does not touch any data on the disk (other that geom metadata). Whilst this is good in some circumstances (if you accidently mis-partition your disk you can fix the partitioning and your data will still be there), it can cause problems if a partitioning change exposes stale metadata. In particular, ZFS will "taste" every[*] partition it can see, looking for ZFS metadata. Resizing a partition could result in seemingly valid but stale ZFS metadata becoming visible, potentially confusing ZFS. If you look through my procedure, you'll notice that I explicitly write zeroes over regions that contained ZFS metadata to guard against this. [*] I'm not sure whether ZFS looks at the partition type. --=20 Peter Jeremy --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAlzjxLNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzT5xw//SuHrAStvIbro3rpmOKKfKY3oB4MFNWK8axMZMj8qwgBst6Nz7KiKr14O sFb5cyZ3029ncn9+dE9xcoZl+dClkfsANiPPcTF+zds2waVPW1I8reXR8kxG/ZF6 Kpv6btmVi7KmYO+mgIeKlrozNOx7sANJh1ZDpd7SAjtJWR+WwNHL8/0PjXeKBjIm TufNz2SdxFC5IlERuPaI9/tL6xX7b5rr+xM1kbS0KwC+unl/zbWSXh5jMzeAaYRN 4TFyKAwQHepjWhr+4Y8gE++ohPFGPq0l9uiz7AQWj3dW//UAtXT9IYpejP7UoNVb mpWBcT/D+QPH7s/ZvkPEs5CetfQuCSVeo956nf8i3JFxV/o+yz8fO0rjR+P0qiff QeP0m0kOhma8we6IN/wi0RPFSfgyuLVFznh2A8qjD8D1PBcCMLW6CKKCUPwXhdmn pHz8X0REzm/HcoKv8B4EsKM4SweJ+EJ2dlEi985A2dsutGUDcL3LRyDWhL2hYa5n lY+g8kpovquVdP3lkDSKGPOrNZs+V7T/rGmYHQd/RJl5EwTXRVQBbHU0wEUWxBwu b2OQmXUV/XFSWaw7Ks+6cgjqq+N8/VFuZuESyI/mLAe9JK1wbFrNvEXFRK5+ylHY s0345Gu19RIhZF39RMD37b4KWR0PsGfsU9z0ydPtIpfbyirs9TA= =Qtrh -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK-- From owner-freebsd-fs@freebsd.org Tue May 21 09:33:12 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE1715A853A for ; Tue, 21 May 2019 09:33:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 80E4385EB4 for ; Tue, 21 May 2019 09:33:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 44FDE15A8539; Tue, 21 May 2019 09:33:11 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30DA815A8538 for ; Tue, 21 May 2019 09:33:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF94185EB3 for ; Tue, 21 May 2019 09:33:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 1333BDEB9 for ; Tue, 21 May 2019 09:33:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4L9X9Ee033648 for ; Tue, 21 May 2019 09:33:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4L9X9s3033647 for fs@FreeBSD.org; Tue, 21 May 2019 09:33:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Tue, 21 May 2019 09:33:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: Trond.Endrestol@ximalas.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 09:33:12 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 Trond.Endrestol@ximalas.info changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204484|0 |1 is obsolete| | --- Comment #4 from Trond.Endrestol@ximalas.info --- Created attachment 204504 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204504&action= =3Dedit Streamlined the patch for libexec/rc/rc.d/zfs making parallel mount optional Filtering in the right order is key. First eliminate filesystems with no va= lid mountpoints, next eliminate filesystems having canmount=3Doff. We're left w= ith a simple on-off switch, defaulting to off. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Tue May 21 22:17:20 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19AD715919EC for ; Tue, 21 May 2019 22:17:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB7E8411B for ; Tue, 21 May 2019 22:17:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 47B5615919EB; Tue, 21 May 2019 22:17:19 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 230F915919EA for ; Tue, 21 May 2019 22:17:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B114384110 for ; Tue, 21 May 2019 22:17:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id E449314CF8 for ; Tue, 21 May 2019 22:17:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMHHR9031795 for ; Tue, 21 May 2019 22:17:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4LMHHqO031794 for fs@FreeBSD.org; Tue, 21 May 2019 22:17:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Tue, 21 May 2019 22:17:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:17:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 Peter Eriksson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pen@lysator.liu.se --- Comment #5 from Peter Eriksson --- We do something similar on our servers - however the main reason we do it i= s to speed things up. Normally a standard "zfs mount -a" would take slightly less than 1 hour to execute (a lot of ZFS filesystems) which was a bit of a pain when we needed to reboot the servers (or they crashed during office hours). So we've been investigating various ways of speeding things up. A hack was = to run a large number of individual "zfs mount $FS" commands in parallell, but then you need to sort the filesystems so they get mounted in the right orde= r... We also do the bulk of the filesystem mounting in the background so we atle= ast get a login prompt and can login to the machine and see what is happening... The hack was surprisingly effective - 5-10 minutes instead of 1 hour. :-) The scripts can very probably be improved a lot but they do the job for us. Would have been nice to have a "zfs mount --recursive POOL" command. Or a "= zfs mount --parallell=3D20 -a" command. :-) >From our /etc/rc.d/zfs: zfs_start_main() { /sbin/zfs-speedmount > /var/log/zfs/zfs-speedmount.log 2>&1 zfs share -a touch /etc/zfs/exports } ... zfs_start() { if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then zfs_start_jail else # Empty exports-file, to prevent annoying error messages while mounting echo -n "" > /etc/zfs/exports # Mount all other root pool filesystems first /sbin/zfs-mountrpool -v # And then we do the rest in the background zfs_start_main & fi } (I'll add our scripts as attachments in case they might be useful to someon= e). --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Tue May 21 22:18:27 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8EA11591AC0 for ; Tue, 21 May 2019 22:18:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0B78422A for ; Tue, 21 May 2019 22:18:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 412611591ABB; Tue, 21 May 2019 22:18:26 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EC7E1591ABA for ; Tue, 21 May 2019 22:18:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC16584227 for ; Tue, 21 May 2019 22:18:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 08D8B14CFB for ; Tue, 21 May 2019 22:18:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMIO4V032876 for ; Tue, 21 May 2019 22:18:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4LMIOiP032875 for fs@FreeBSD.org; Tue, 21 May 2019 22:18:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Tue, 21 May 2019 22:18:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:18:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 --- Comment #6 from Peter Eriksson --- Created attachment 204524 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204524&action= =3Dedit Shell script to mount all filesystems in a zpool (the pool for / by default) --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Tue May 21 22:19:28 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1B761591B6C for ; Tue, 21 May 2019 22:19:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6638430A for ; Tue, 21 May 2019 22:19:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 342FF1591B6B; Tue, 21 May 2019 22:19:28 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 216301591B6A for ; Tue, 21 May 2019 22:19:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B175D84308 for ; Tue, 21 May 2019 22:19:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id EB76B14D01 for ; Tue, 21 May 2019 22:19:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4LMJQUv033897 for ; Tue, 21 May 2019 22:19:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4LMJQnO033896 for fs@FreeBSD.org; Tue, 21 May 2019 22:19:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems Date: Tue, 21 May 2019 22:19:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2019 22:19:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237517 --- Comment #7 from Peter Eriksson --- Created attachment 204525 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D204525&action= =3Dedit Script to parallel-mount zfs filesystems (uses "parallel") --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Wed May 22 15:19:41 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89FF515AE496; Wed, 22 May 2019 15:19:41 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-xc30.google.com (mail-yw1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D4718A47E; Wed, 22 May 2019 15:19:40 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw1-xc30.google.com with SMTP id t5so978810ywf.10; Wed, 22 May 2019 08:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Du7+YfdsA++Saah3CuC4q2twuDJTQO1oEJCBTEXc4RY=; b=niE/zW7kcahWkfTLUFRWuJCaAF4UnyjQy0RoX9pILUzkRXNRmLm09piBRKXOJsx1Xq w33smkybzOVLmM9EUdmJfhSwJCtGxP9CgHi6LgrF+9JTkSNebT0NVD/L/siQVelFJXFj LSted7gPUUuekxUeNLEcwswyPvfMUAUSWtTdq7IHksIbmw7Y4E0maedIbAU9b76FbWyu o4+49oHNXbLFP0Kl+HKdhOPW370TWv3I2mcHHSKYGcbzf4SGkRJAni8dE6zY01/f0GlF bQ4POVRQw6jsj2GUk7Xc3QPS5OdI1/XRJiBX2xZ4/tTGVXWlFip95P1t97KskVg2AJix 8xnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Du7+YfdsA++Saah3CuC4q2twuDJTQO1oEJCBTEXc4RY=; b=qehO3NWXU8mdyWbrzfIEvqzl3M507YiidmwCaS7j6oHUCizr9rw6kVEDQelYzwZAze keTJmUqXo5dltRbfeFp5d9l4NUJzw0cInq/qTgENNdZvEYx++S8PIyscYL254sAd7luE qwbDnbQP7WMEQLFam+9scJhFKR0gEhMQ8POdpdX6rZdXijM+yxDWwsAObxGmWpjC+f2y AectQVsrrEHj72/kdDXHeFzu2naqbFZIOL1HV2x0mN5NRwjOwybsRHT11uf/2zMP/u5Z vWqhITWm6PM1MqwByUdXrFsk9OBSSIJELrb7jIu/0Aa+u+2mn8O0ikzz6rp8dxLhxmub L+ZA== X-Gm-Message-State: APjAAAWaxEAikgha+1PT/VZfE3EIE9MCLHEk57h9chw6XJlrIE69XOWn nk35/jqUT27oXbEWvUC9asco3Nmo2eA= X-Google-Smtp-Source: APXvYqy8/2LyqjMQhe0eMnUF15iKppcYDVdYNRApOUjCB58OsoA6MkkAmrOJ7q3PpHTDqjFwq05HJA== X-Received: by 2002:a81:4987:: with SMTP id w129mr26866977ywa.438.1558538378860; Wed, 22 May 2019 08:19:38 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id v144sm6406295ywv.15.2019.05.22.08.19.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 08:19:38 -0700 (PDT) Sender: Alexander Motin Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem To: Mark Johnston , Lev Serebryakov Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl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bxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> Date: Wed, 22 May 2019 11:19:34 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190520164202.GA2130@spy> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D4718A47E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=niE/zW7k; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::c30 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-6.15 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.99)[ip: (-9.36), ipnet: 2607:f8b0::/32(-3.26), asn: 15169(-2.27), country: US(-0.06)]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[0.3.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; FORGED_SENDER(0.30)[mav@FreeBSD.org,mavbsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[mav@FreeBSD.org,mavbsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:19:41 -0000 On 20.05.2019 12:42, Mark Johnston wrote: > On Mon, May 20, 2019 at 07:05:07PM +0300, Lev Serebryakov wrote: >> >> 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 >> 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 reaping >> 4969 * caches, while we're near arc_c_min. Waiting here also >> gives the >> 4970 * subsequent free memory check a chance of finding that the >> 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 >> >> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, >> this `delay()` looks very wrong. Am I right? Why is it wrong? >> Looks like it should be `#ifdef illumos`. > > See also r338142, which I believe was reverted by the update. My r345200 indeed reverted that value, but I don't see a problem there. When OS need more RAM, pagedaemon will drain UMA caches by itself. I don't see a point in re-draining UMA caches in a tight loop without delay. If caches are not sufficient to sustain one second of workload, then usefulness of such caches is not very clear and shrinking ARC to free some space may be a right move. Also making ZFS drain its caches more active then anything else in a system looks unfair to me. -- Alexander Motin From owner-freebsd-fs@freebsd.org Wed May 22 15:47:44 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B67A15AF199 for ; Wed, 22 May 2019 15:47:44 +0000 (UTC) (envelope-from karl@denninger.net) Received: from colo1.denninger.net (colo1.denninger.net [104.236.120.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3D78BAF8 for ; Wed, 22 May 2019 15:47:43 +0000 (UTC) (envelope-from karl@denninger.net) Received: from denninger.net (ip68-1-57-197.pn.at.cox.net [68.1.57.197]) by colo1.denninger.net (Postfix) with ESMTP id E44672110BA for ; Wed, 22 May 2019 11:47:06 -0400 (EDT) Received: from [192.168.43.86] (unknown [172.56.20.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by denninger.net (Postfix) with ESMTPSA id 9CB1D109BEE for ; Wed, 22 May 2019 10:47:05 -0500 (CDT) Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem To: freebsd-fs@freebsd.org References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> From: Karl Denninger Message-ID: <89064e9c-251a-a065-3a72-ac65c884d51d@denninger.net> Date: Wed, 22 May 2019 10:47:00 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms020004070907060108040100" X-Rspamd-Queue-Id: 2E3D78BAF8 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.16 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_ATTACHMENT(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[px.denninger.net]; NEURAL_HAM_SHORT(-0.35)[-0.348,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:14061, ipnet:104.236.64.0/18, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:+]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[197.57.1.68.zen.spamhaus.org : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; SIGNED_SMIME(-2.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.60)[ip: (-9.88), ipnet: 104.236.64.0/18(-4.26), asn: 14061(1.18), country: US(-0.06)]; DMARC_NA(0.00)[denninger.net]; R_SPF_NA(0.00)[] X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:47:44 -0000 This is a cryptographically signed message in MIME format. --------------ms020004070907060108040100 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 5/22/2019 10:19 AM, Alexander Motin wrote: > On 20.05.2019 12:42, Mark Johnston wrote: >> On Mon, May 20, 2019 at 07:05:07PM +0300, Lev Serebryakov wrote: >>> 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 cache= s. >>> 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 re= aping >>> 4969 * caches, while we're near arc_c_min. Waiting here al= so >>> gives the >>> 4970 * subsequent free memory check a chance of finding tha= t the >>> 4971 * asynchronous reap has already freed enough memory, a= nd >>> 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? > Why is it wrong? > >>> Looks like it should be `#ifdef illumos`. >> See also r338142, which I believe was reverted by the update. > My r345200 indeed reverted that value, but I don't see a problem there.= > When OS need more RAM, pagedaemon will drain UMA caches by itself. I > don't see a point in re-draining UMA caches in a tight loop without > delay. If caches are not sufficient to sustain one second of workload,= > then usefulness of such caches is not very clear and shrinking ARC to > free some space may be a right move. Also making ZFS drain its caches > more active then anything else in a system looks unfair to me. There is a long-lasting pathology with the older implementation. The=20 short answer is that if you have cache in UMA but unallocated to current = working set it's completely wasted -- unless quickly re-used.=C2=A0 So a = small buffer between current and allocation is ok, but the UMA system=20 will leave large amounts out but unused. Reclaiming that after a=20 reasonable amount of time is a very good thing. The other problem is that disk cache should NEVER be preferred over=20 working set space.=C2=A0 It's always wrong to do so because a working set= =20 page-out is 1 *guaranteed* I/O (to page it out) and possibly 2 I/Os (if=20 required again and thus must be recalled) while a disk cache page is 1=20 *possible* I/O avoided (if the disk cache block is requested again) It is never the right move to intentionally take an I/O in order to=20 avoid a *possible* I/O. Under certain workloads making that choice leads = to severe pathological behavior (~30 second "pauses" where the system is = doing I/O like crazy but a desired process -- such as a database, or=20 shell, does nothing waiting on working set to be paged back in) when=20 there are gigabytes (or 10s of gigabytes) of ARC outstanding. --=20 -- Karl Denninger /The Market-Ticker/ S/MIME Email accepted and preferred --------------ms020004070907060108040100 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC DdgwggagMIIEiKADAgECAhMA5EiKghDOXrvfxYxjITXYDdhIMA0GCSqGSIb3DQEBCwUAMIGL MQswCQYDVQQGEwJVUzEQMA4GA1UECAwHRmxvcmlkYTESMBAGA1UEBwwJTmljZXZpbGxlMRkw FwYDVQQKDBBDdWRhIFN5c3RlbXMgTExDMRgwFgYDVQQLDA9DdWRhIFN5c3RlbXMgQ0ExITAf BgNVBAMMGEN1ZGEgU3lzdGVtcyBMTEMgMjAxNyBDQTAeFw0xNzA4MTcxNjQyMTdaFw0yNzA4 MTUxNjQyMTdaMHsxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdGbG9yaWRhMRkwFwYDVQQKDBBD dWRhIFN5c3RlbXMgTExDMRgwFgYDVQQLDA9DdWRhIFN5c3RlbXMgQ0ExJTAjBgNVBAMMHEN1 ZGEgU3lzdGVtcyBMTEMgMjAxNyBJbnQgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK AoICAQC1aJotNUI+W4jP7xQDO8L/b4XiF4Rss9O0B+3vMH7Njk85fZ052QhZpMVlpaaO+sCI KqG3oNEbuOHzJB/NDJFnqh7ijBwhdWutdsq23Ux6TvxgakyMPpT6TRNEJzcBVQA0kpby1DVD 0EKSK/FrWWBiFmSxg7qUfmIq/mMzgE6epHktyRM3OGq3dbRdOUgfumWrqHXOrdJz06xE9NzY vc9toqZnd79FUtE/nSZVm1VS3Grq7RKV65onvX3QOW4W1ldEHwggaZxgWGNiR/D4eosAGFxn uYeWlKEC70c99Mp1giWux+7ur6hc2E+AaTGh+fGeijO5q40OGd+dNMgK8Es0nDRw81lRcl24 SWUEky9y8DArgIFlRd6d3ZY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BSLY PhFMmuAoms+XNZKYmKZu2y8LJUkDMd3CWfuo+Q0qeDwZaS2AGj6W9qsrqFqNYTDg8fXLRmTA W7rLR6+3JnBC58eUDEaaJ7UOXHZmh1lUoyxJSfDCkNcOhWDZ7e2VBksP7e+ndoZrHKeGzLXV CkEsLFl+Nw9psEhTna+pk3c8ea8AjddQSgLr16BSh4e1NfqJppMgalsRfRwbExKF/r1ALme6 FaGp4VbFOWvUwZEsIEMg8U7MWPzWZJ/LNxOc+vWNzwAAAAAAAA== --------------ms020004070907060108040100-- From owner-freebsd-fs@freebsd.org Wed May 22 15:50:22 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3904E15AF632; Wed, 22 May 2019 15:50:22 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9616B8BF48; Wed, 22 May 2019 15:50:21 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [IPv6:2a01:4f8:201:6350::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: lev/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 15441127E1; Wed, 22 May 2019 15:50:21 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id BA68818C29; Wed, 22 May 2019 18:50:16 +0300 (MSK) Reply-To: lev@FreeBSD.org Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem To: Alexander Motin , Mark Johnston Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> From: Lev Serebryakov Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFKbGksBEADeguVs+XyJc3mL3iiOBqDd16wSk97YTJYOi4VsHsINzJr09oFvNDiaDBIi fLn2p8XcJvehcsF2GSgrfXfw+uK4O1jyNIKJmiYA0EtE+ZbRtvDrrE0w6Q8+SDeKA21SWh3Y vSQ0DJUontbgW55ER2CbEiIUTIn34uQ0kmESAaw/v5p/9ue8yPTmURvv130FqPFz8VPzltqL NxyGt54TxPfKAzAHEIwxlEZ63JOwzloKh1UDBExcsf9nJO08/TAVgR5UZ5njFBPzaaquhRoP qPJLEQQDqxPIlvMNtHKf7iIebE4BHeqgCdJA0BoiR6gpa0wlsZtdrTPK3n4wYSphLvGbhfOZ YW/hbcu7HYS/FImkVxB3iY17kcC1UTnx4ZaYeASPBGOOPbXky1lLfmDGWIFT//70yx+G17qD OZzF1SvJJhGvh6ilFYaWMX7T+nIp6Mcafc4D7AakXM+XdubNXOMlCJhzPcZ0skgAEnYV587w V7em5fDVwQccwvtfezzqKeJAU5TGiywBHSR5Svzk2FwRNf6M//hWkpq0SRR63iOhkHGOAEBi 69GfEIwH2/w24rLxP0E+Hqq8n+EWNkPatw1Mhcl5PKkdvGCjJUaGNMkpBffjyYo254JXRscR eEnwdIkJt4ErDvjb2/UrOFq31wWMOiLzJeVchAgvTHBMRfP9aQARAQABtCFMZXYgU2VyZWJy eWFrb3YgPGxldkBGcmVlQlNELm9yZz6JAlYEEwEIAEACGwMHCwkIBwMCAQYVCAIJCgsEFgID AQIeAQIXgB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t2Tk cLuHmoS+fvUesQXnYV2aQi9HciriPIj2gvJ6WjgiaC/PpePil0fzyrfG/JMyHL0qcgmYoj0= Organization: FreeBSD Message-ID: <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> Date: Wed, 22 May 2019 18:50:10 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BlV7hosPIwYhYCaZHvapg666riVhkmAeN" X-Rspamd-Queue-Id: 9616B8BF48 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 15:50:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BlV7hosPIwYhYCaZHvapg666riVhkmAeN Content-Type: multipart/mixed; boundary="JQ4hsq8GWofW47oUNQaui45CORKWOjTpL"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: Alexander Motin , Mark Johnston Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> In-Reply-To: <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> --JQ4hsq8GWofW47oUNQaui45CORKWOjTpL Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 22.05.2019 18:19, Alexander Motin wrote: >>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So,= >>> this `delay()` looks very wrong. Am I right? >=20 > Why is it wrong? One second pause after synchronous operation to wait it completion? There one more questionable piece of code: 6936 static void 6937 arc_lowmem(void *arg __unused, int howto __unused) 6938 { =2E... 6947 arc_reduce_target_size(to_free); 6948 =09 6949 mutex_enter(&arc_adjust_lock); 6950 arc_adjust_needed =3D B_TRUE; 6951 zthr_wakeup(arc_adjust_zthr); 4587 static void 4588 arc_reduce_target_size(int64_t to_free) 4589 { =2E.. 4612 if (asize > arc_c) { 4613 DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize, 4614 uint64_t, arc_c); 4615 /* See comment in arc_adjust_cb_check() on why lock+flag */ 4616 mutex_enter(&arc_adjust_lock); 4617 arc_adjust_needed =3D B_TRUE; 4618 mutex_exit(&arc_adjust_lock); 4619 zthr_wakeup(arc_adjust_zthr); 4620 } 4621 } Looks like lock/flag/wakeup sequence (which is now very cheap =E2=80=94 = mutexes are not cheap, and this mutex could become contended in low-memory situation) could be called twice. Looks like `arc_reduce_target_size()` should return boolean value and unconditional signalling in `arc_lowmem()` should become conditional. --=20 // Lev Serebryakov --JQ4hsq8GWofW47oUNQaui45CORKWOjTpL-- --BlV7hosPIwYhYCaZHvapg666riVhkmAeN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlzlb7JfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c R48Euw/8DRFP4xmKsRGd0YSZC8HIxEi2Sk7PvgPe6IH4bOMDyJac85OlNl+ME82J pyLA9smqMktiApB8u0phtI6qciM91fQsmfJiBfEwWCNywXTKp0RsQ6ItimYPLaq4 PLkm8L/ldI5JjJXlGw6lEIJznWsmF4ZwGxjbev3ET+4PNkIJVSySJUG46suVL8SQ noxSpM9FZyYcwAho3NQ+q0MhaBqnYFiTQyK+yKFyNoK6XBbdaSI87VlYjeSmqeao F28qyTCUmOqbqp1vmKEAgqdxjpFGG+fp2/2nn2wqg4AyF61omRST7oSKwByDcBD4 X7z6RcniB4GVaGpGlzCZA48CwsNuYsZiIP1iuBYc876UNFvTJVRn9UuUb2zsMYRS 67Meq84DLWbwm7wACO8CB8RF3DwOQ1d10G0qfKmqzl9hx6sMRnIKKmZIN/HJgpNI 7QZrPpS8VZrYpoW8u0bvIsP9CqpUjFnD1WGyA1HOXeMaDspPlrKH1wF1E9MrpvqT 8xA7OYdKkdAEvia9OszerJz0YLtZTukQxDPPPPigR9twFAr2IKRJ7nzrfojjhVRL p0XPYuBzukhZRs+uecc+Zy+LjnszwcLJclDyE7yk7fvg8EjE1Rl6ux4h8jV7HrXa YRq1cc1hHO2cM3xvdo68IkB/5X4xjkX5C1fEuDZVzubokV6eilw= =wRGm -----END PGP SIGNATURE----- --BlV7hosPIwYhYCaZHvapg666riVhkmAeN-- From owner-freebsd-fs@freebsd.org Wed May 22 16:07:32 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C32C515B00CE; Wed, 22 May 2019 16:07:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91BA48CD62; Wed, 22 May 2019 16:07:31 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yb1-xb29.google.com with SMTP id a3so1067585ybr.6; Wed, 22 May 2019 09:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=d/oYZi2ewCe/aWOVDsesljddDsXRNafqcPcG1b8qQ0g=; b=uWxXQ2qiSmzURPIOfOlZNM1aP3VJGAidAmjAG9OpNzJoj1Dtxml2SIF9KmWk5sbqbk KG6N+HSRXzRb/oNHCLYZp1n5REfwhaELi49xpzaJfu9msF9rs9YcandK5rLRWl37l6kw dbE/8mH1D62iLhZ6uOticuT7iGU9aV4ik2zn7JxW2E+7GdmGOJZ1InLmKxbCrQyqbtzz rgDGk3pHZyaLCCbhTdC2BqDb2vyVbNmR/RRvIBrFVNhcO58JFvqs7mF2VZkwINgGdaVm 7Iht19Zl2hhh7zz2w0UCC01+klFukfQmc9jYIRdiDd+MoaAHAmRbcllwC0uzmuMisYXN x/5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=d/oYZi2ewCe/aWOVDsesljddDsXRNafqcPcG1b8qQ0g=; b=XamYUAM7ROVoc/ZCBhX3mId4/WmCGJ85E+lkmYxG+sIqXhCfWp5IxP8QN/89/OaCN9 J1d7FhOePM8BnvxoN90jXvZnkmdwtxv7EhnZy9FPhcr56jv42P8O944HJQK5EplMsGJR cP0WrggvoW14zFDf41V5Uzvx+4qQSFBZ7gnH77nFQmOtDNmbKwVN6vlBS6PMJCMjUAGA kYfcXmpphFEObSU3tuOMOrU6YyhhFUDLYpM8X36aS7bYqtIMl/qek4s8/8SipuYlTIHY 57th3Ob1PIz7BQk50B3xecr33jb2439aGl0C6YfF2n1fcsILvRk309Q7ZahBPVQ8R8zK /n1g== X-Gm-Message-State: APjAAAX8K0y7HM8q8nB50EVPv6Tqk86qCy/DtRji/zpDfmfOg0OVYXI8 xQ0v+oIhG/86J+cNZeC0CnucQkL3PoY= X-Google-Smtp-Source: APXvYqxhGfQhFfYs33gUNJw9pt3PaVavnE+SuqznooxPkeQrwKfsyrJtNdmdKBMdcXfz6RJVnI9M7w== X-Received: by 2002:a25:d142:: with SMTP id i63mr4951839ybg.399.1558541250504; Wed, 22 May 2019 09:07:30 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id x5sm6533838ywb.50.2019.05.22.09.07.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 09:07:30 -0700 (PDT) Sender: Alexander Motin Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem To: lev@FreeBSD.org, Mark Johnston Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7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ylzzuyXEZ R1EdEIzQ/a1nh/0j4NXtzZEqKW4aTWlmSqb6wN8jh1OSOOqkYsfnE3nfxcZbxi4IRoNQYlm5 9R8AEQEAAcLAZQQYAQoADwUCU7PEDAIbDAUJBaOagAAKCRCDGMOVW6sif7FRB/4k9y/GaGqU fcJiXdQHRAKHCUvbKMFgeEDHOg33qx+POS2Ah85/PXVa2jYBldCZDmYc+zl48aEMd163a7s3 0gJaB7CYElwxlKUk6c+5gwoYIJuJJzSzW0JzSD5ch7RIRxbfxrKdsiHrUW8AeduZWzlK6VaW RmWILgLmxfLdhEVFWxbr99GSeVFZaZwn6tl/8CvBcgYoARvJvl0V5zS1akQfEISYkwL9EfUI W44EOHranL5qUXkedXBYp6fRsooGrIimfwYxaC8FbXhk3FMgMjDMRiVq4POHo1iGeYETsUrL NM6184E25gPVtX2fb3RhM8Xh6BkwCZ6ZYbQ+AcD4F/cKwsB8BBgBCgAmAhsMFiEE6YzzxOac w80OV51VgxjDlVurIn8FAllgwtgFCQ0xzMwACgkQgxjDlVurIn9OqAf9FAcKWS95wTTbraXA qg/+bQyHgjlMtGCgkmfxLsbUGeqiFgmSIuoDrF7q6sYPs6p00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <2a50e192-e672-7c87-178b-afd509a765df@FreeBSD.org> Date: Wed, 22 May 2019 12:07:29 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91BA48CD62 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=uWxXQ2qi; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::b29 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-6.07 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.97)[ip: (-9.28), ipnet: 2607:f8b0::/32(-3.26), asn: 15169(-2.27), country: US(-0.06)]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[9.2.b.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.89)[-0.888,0]; FORGED_SENDER(0.30)[mav@FreeBSD.org,mavbsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[mav@FreeBSD.org,mavbsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:07:33 -0000 On 22.05.2019 11:50, Lev Serebryakov wrote: > On 22.05.2019 18:19, Alexander Motin wrote: > >>>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, >>>> this `delay()` looks very wrong. Am I right? >> >> Why is it wrong? > One second pause after synchronous operation to wait it completion? No. To rate-throttle them. This gives UMA a second to get back into minimally steady state after we ripped all caches from it. As I have told, we do not want to drain caches constantly in a tight loop, we want more or less steady state. > There one more questionable piece of code: > > 6936 static void > 6937 arc_lowmem(void *arg __unused, int howto __unused) > 6938 { > .... > 6947 arc_reduce_target_size(to_free); > 6948 > 6949 mutex_enter(&arc_adjust_lock); > 6950 arc_adjust_needed = B_TRUE; > 6951 zthr_wakeup(arc_adjust_zthr); > > > 4587 static void > 4588 arc_reduce_target_size(int64_t to_free) > 4589 { > ... > 4612 if (asize > arc_c) { > 4613 DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize, > 4614 uint64_t, arc_c); > 4615 /* See comment in arc_adjust_cb_check() on why > lock+flag */ > 4616 mutex_enter(&arc_adjust_lock); > 4617 arc_adjust_needed = B_TRUE; > 4618 mutex_exit(&arc_adjust_lock); > 4619 zthr_wakeup(arc_adjust_zthr); > 4620 } > 4621 } > > Looks like lock/flag/wakeup sequence (which is now very cheap — mutexes > are not cheap, and this mutex could become contended in low-memory > situation) could be called twice. > > Looks like `arc_reduce_target_size()` should return boolean value and > unconditional signalling in `arc_lowmem()` should become conditional. I don't think this is not a hot path to bother about it. arc_lowmem() calls should be very rare. -- Alexander Motin From owner-freebsd-fs@freebsd.org Wed May 22 16:09:04 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E2E15B0149; Wed, 22 May 2019 16:09:03 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA1498CDF8; Wed, 22 May 2019 16:09:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTTnS-0004CW-60; Wed, 22 May 2019 19:08:54 +0300 Date: Wed, 22 May 2019 19:08:54 +0300 From: Slawa Olhovchenkov To: Lev Serebryakov Cc: Alexander Motin , Mark Johnston , freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Message-ID: <20190522160854.GD47119@zxy.spb.ru> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: BA1498CDF8 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.66 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.94)[0.941,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.91)[0.910,0]; IP_SCORE(0.00)[country: RU(0.01)]; MX_GOOD(-0.01)[zxy.spb.ru]; NEURAL_SPAM_LONG(0.92)[0.918,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:09:04 -0000 On Wed, May 22, 2019 at 06:50:10PM +0300, Lev Serebryakov wrote: > On 22.05.2019 18:19, Alexander Motin wrote: > > >>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, > >>> this `delay()` looks very wrong. Am I right? > > > > Why is it wrong? > One second pause after synchronous operation to wait it completion? > > There one more questionable piece of code: > > 6936 static void > 6937 arc_lowmem(void *arg __unused, int howto __unused) > 6938 { > .... > 6947 arc_reduce_target_size(to_free); > 6948 > 6949 mutex_enter(&arc_adjust_lock); > 6950 arc_adjust_needed = B_TRUE; > 6951 zthr_wakeup(arc_adjust_zthr); > > > 4587 static void > 4588 arc_reduce_target_size(int64_t to_free) > 4589 { > ... > 4612 if (asize > arc_c) { > 4613 DTRACE_PROBE2(arc__shrink_adjust, uint64_t, asize, > 4614 uint64_t, arc_c); > 4615 /* See comment in arc_adjust_cb_check() on why > lock+flag */ > 4616 mutex_enter(&arc_adjust_lock); > 4617 arc_adjust_needed = B_TRUE; > 4618 mutex_exit(&arc_adjust_lock); > 4619 zthr_wakeup(arc_adjust_zthr); > 4620 } > 4621 } > > Looks like lock/flag/wakeup sequence (which is now very cheap — mutexes > are not cheap, and this mutex could become contended in low-memory > situation) could be called twice. > > Looks like `arc_reduce_target_size()` should return boolean value and > unconditional signalling in `arc_lowmem()` should become conditional. No, for FreeBSD case arc_lowmem() don't be conditional from this condition in this maner and need completly differnt set of ananlys factors and do different... From owner-freebsd-fs@freebsd.org Wed May 22 16:19:48 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4182D15B0669; Wed, 22 May 2019 16:19:48 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 997258D597; Wed, 22 May 2019 16:19:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTTxx-0004GA-HN; Wed, 22 May 2019 19:19:45 +0300 Date: Wed, 22 May 2019 19:19:45 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: lev@FreeBSD.org, Mark Johnston , freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Message-ID: <20190522161945.GE47119@zxy.spb.ru> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> <2a50e192-e672-7c87-178b-afd509a765df@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a50e192-e672-7c87-178b-afd509a765df@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 997258D597 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.62 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.91)[0.906,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.90)[0.901,0]; IP_SCORE(0.00)[country: RU(0.01)]; MX_GOOD(-0.01)[cached: zxy.spb.ru]; NEURAL_SPAM_LONG(0.92)[0.917,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:19:48 -0000 On Wed, May 22, 2019 at 12:07:29PM -0400, Alexander Motin wrote: > On 22.05.2019 11:50, Lev Serebryakov wrote: > > On 22.05.2019 18:19, Alexander Motin wrote: > > > >>>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, > >>>> this `delay()` looks very wrong. Am I right? > >> > >> Why is it wrong? > > One second pause after synchronous operation to wait it completion? > > No. To rate-throttle them. This gives UMA a second to get back into > minimally steady state after we ripped all caches from it. As I have > told, we do not want to drain caches constantly in a tight loop, we want > more or less steady state. And also (posible) additionaly delay arc_get_data_impl(). This is incorrectly throttling implementation. From owner-freebsd-fs@freebsd.org Wed May 22 16:49:52 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08D4315B11A6; Wed, 22 May 2019 16:49:52 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-xc35.google.com (mail-yw1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3A648EA55; Wed, 22 May 2019 16:49:50 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yw1-xc35.google.com with SMTP id n76so1116955ywd.1; Wed, 22 May 2019 09:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1fYSSI57UnaVLVFb2M21KmnSc5lRfRNY8i1I2cQphrI=; b=njutdjjmVuvrvOWS7qWEGQ4WBs/RriVREAS4HItRnL2GZnmSx4p2lGfmpPYCq7AX8z 45wjVhc/EgzsAoWZ509vGx58KjY+s/kyNph8YkKnv8YGYaEGT+kvA8M0A5uYbwh6Z5j1 jVDGMCbbd1k8BNmSApcfqVQYUlivoblDqdMIZWrMJQgC4JxezaRMz6i+IwKWzxkp8B+3 59lr2VKk1Ma7BNHMEEQF08+2HYMbv938+EoIhUeLbxpdrBMGLZhkDAfnfNo1qpuasmha AxzZXuUY9I+kaOojSyyuEHxbPw29F9J4UHt6KTekj0gvUHBnNhN42tS1KdlsLCAWBZpa bt1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1fYSSI57UnaVLVFb2M21KmnSc5lRfRNY8i1I2cQphrI=; b=V6Aj7iXll4joJLb7P2xYX7nqOSX2Frfb7ccbwCGExlQ25UBbapKO9GnwqelHYMaBWo RSoxTx0gUDSTqoQbsc/KSUc3kOdrOTSdL7hKXIBN1ZOki2X+kw5Y3soCHfKKkWS6UwSe e8AwUbdFdbncMAtfNoB/QTk3ZFBdSAGyP2aUfqiIA4egjbF68ux/8jwuU247rf/QOqc3 lMNloz5W/oSW6Br/we5ozEWY8d4UC0Xr/OcloXUMT7tIWEV6XDVAynSpgul5mqSd8pF1 O1LuQt+wbVN1rQmCQW+uq7ZGmo0MiZ3UZHJxo6LsQvt45TvX5j1bWWRWR5PCCSRkhlh9 gmcA== X-Gm-Message-State: APjAAAXeOf0eLYUfeA41tekcVup4P1a6exDPgB2Eyvmm5ZfpFuOLj0za 42GHtQUYFq8gtk6rOeE4UvkyCjYNXPY= X-Google-Smtp-Source: APXvYqxhd9qdA0HDm5apkO3lD+7LErQJYkg/To/jHUawLCX48VGV00ARNtqxBEdkqVJn0gYkcoDnCQ== X-Received: by 2002:a0d:d4cf:: with SMTP id w198mr44346861ywd.24.1558543789848; Wed, 22 May 2019 09:49:49 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id j187sm6361843ywj.32.2019.05.22.09.49.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 09:49:49 -0700 (PDT) Sender: Alexander Motin Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem To: Slawa Olhovchenkov Cc: lev@FreeBSD.org, Mark Johnston , freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> <2a50e192-e672-7c87-178b-afd509a765df@FreeBSD.org> <20190522161945.GE47119@zxy.spb.ru> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MS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00CXXZRuuNZt0lX7O95re8mgz gxm5iJisZpdbHMVepYlw/AxT2wCHwxGCEe64Lm+A9vjlOd+3D3/6fSLwZ9WFCE6p6lQZ1CDg 09xe+JKSgC+KDqmn0tzGKyfSCuhRAq3XkZyxL1hxBaDeP0eeKlzoy7jXodf3wVvXXc0cmpza B5McuRHK4EU6jIioHo30YqPM4AjPHGxV2X1N6/Aayungzj9EXNZtKCxs6dsTvjniWa5VkZ9F 4SOdSbxEen1DZRYpeWnd7GVmO86n+5USkKCXPg== Message-ID: <5ea6d9bc-4fd3-d8e6-adf4-513b4edc71e3@FreeBSD.org> Date: Wed, 22 May 2019 12:49:48 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522161945.GE47119@zxy.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: F3A648EA55 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=njutdjjm; spf=pass (mx1.freebsd.org: domain of mavbsd@gmail.com designates 2607:f8b0:4864:20::c35 as permitted sender) smtp.mailfrom=mavbsd@gmail.com X-Spamd-Result: default: False [-6.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[5.3.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.92)[-0.917,0]; IP_SCORE(-2.88)[ip: (-8.81), ipnet: 2607:f8b0::/32(-3.26), asn: 15169(-2.27), country: US(-0.06)]; FORGED_SENDER(0.30)[mav@FreeBSD.org,mavbsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[mav@FreeBSD.org,mavbsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 16:49:52 -0000 On 22.05.2019 12:19, Slawa Olhovchenkov wrote: > On Wed, May 22, 2019 at 12:07:29PM -0400, Alexander Motin wrote: > >> On 22.05.2019 11:50, Lev Serebryakov wrote: >>> On 22.05.2019 18:19, Alexander Motin wrote: >>> >>>>>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, >>>>>> this `delay()` looks very wrong. Am I right? >>>> >>>> Why is it wrong? >>> One second pause after synchronous operation to wait it completion? >> >> No. To rate-throttle them. This gives UMA a second to get back into >> minimally steady state after we ripped all caches from it. As I have >> told, we do not want to drain caches constantly in a tight loop, we want >> more or less steady state. > > And also (posible) additionaly delay arc_get_data_impl(). arc_get_data_impl() depends on arc_adjust_zthr, not on arc_reap_zthr, so it should not get blocked by this delay. That was the motivation for the threads splitting in the last rewrite. > This is incorrectly throttling implementation. I am not particularly defending ZFS doing its own reclamation, I'd more trust pagedaemon, but so far I haven't seen any memory pressure issues after I committed this. -- Alexander Motin From owner-freebsd-fs@freebsd.org Wed May 22 17:38:39 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 645FE15B2E8B; Wed, 22 May 2019 17:38:39 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDAC790784; Wed, 22 May 2019 17:38:37 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTVCF-0004ew-I2; Wed, 22 May 2019 20:38:35 +0300 Date: Wed, 22 May 2019 20:38:35 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: lev@FreeBSD.org, Mark Johnston , freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Commit r345200 (new ARC reclamation threads) looks suspicious to me - second potential problem Message-ID: <20190522173835.GB2161@zxy.spb.ru> References: <369cb1e9-f36a-a558-6941-23b9b811825a@FreeBSD.org> <20190520164202.GA2130@spy> <28c7430b-fb7c-6472-5c1b-fa3ff63a9e73@FreeBSD.org> <94d051a3-3427-7a5b-efe7-169cff2265d3@FreeBSD.org> <2a50e192-e672-7c87-178b-afd509a765df@FreeBSD.org> <20190522161945.GE47119@zxy.spb.ru> <5ea6d9bc-4fd3-d8e6-adf4-513b4edc71e3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ea6d9bc-4fd3-d8e6-adf4-513b4edc71e3@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: EDAC790784 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.68 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.95)[0.954,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.91)[0.913,0]; IP_SCORE(0.00)[country: RU(0.01)]; MX_GOOD(-0.01)[cached: zxy.spb.ru]; NEURAL_SPAM_LONG(0.92)[0.922,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 17:38:39 -0000 On Wed, May 22, 2019 at 12:49:48PM -0400, Alexander Motin wrote: > On 22.05.2019 12:19, Slawa Olhovchenkov wrote: > > On Wed, May 22, 2019 at 12:07:29PM -0400, Alexander Motin wrote: > > > >> On 22.05.2019 11:50, Lev Serebryakov wrote: > >>> On 22.05.2019 18:19, Alexander Motin wrote: > >>> > >>>>>> But looks like `arc_kmem_reap_soon()` is synchronous on FreeBSD! So, > >>>>>> this `delay()` looks very wrong. Am I right? > >>>> > >>>> Why is it wrong? > >>> One second pause after synchronous operation to wait it completion? > >> > >> No. To rate-throttle them. This gives UMA a second to get back into > >> minimally steady state after we ripped all caches from it. As I have > >> told, we do not want to drain caches constantly in a tight loop, we want > >> more or less steady state. > > > > And also (posible) additionaly delay arc_get_data_impl(). > > arc_get_data_impl() depends on arc_adjust_zthr, not on arc_reap_zthr, so > it should not get blocked by this delay. That was the motivation for > the threads splitting in the last rewrite. next case: system under memory pressure, no memory in UMA cache. arc_get_data_impl() see arc_size >= arc_c+overflow (arc_is_overflowing()) and wait arc_adjust_zthr. arc_adjust_zthr in arc_adjust_cb() do arc_adjust() and evict small amount, arc_size still over arc_c (I mean this is posible: arc_c drop by arc_lowmem or arc_szie rised by paralel arc_get_data_impl()), cv_broadcast() don't called. next round is wait work arc_reap_zthr activated by arc_lowmem or timeout: arc_kmem_reap_soon(); dealy(); arc_reduce_target_size() (under memory pressure (arc_c >> arc_shrink_shift) > arc_available_memory() is true) arc_reduce_target_size() re-activate arc_adjust_zthr (asize > arc_c is true). delay() in this path unnecessary and slowly arc_get_data_impl(). > > This is incorrectly throttling implementation. > > I am not particularly defending ZFS doing its own reclamation, I'd more > trust pagedaemon, but so far I haven't seen any memory pressure issues > after I committed this. > > -- > Alexander Motin From owner-freebsd-fs@freebsd.org Sat May 25 00:38:11 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A63D15B8F0A for ; Sat, 25 May 2019 00:38:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E65698668D for ; Sat, 25 May 2019 00:38:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9C18115B8F07; Sat, 25 May 2019 00:38:10 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77EDA15B8F06 for ; Sat, 25 May 2019 00:38:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15ACA86683 for ; Sat, 25 May 2019 00:38:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 53F571CF54 for ; Sat, 25 May 2019 00:38:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P0c9G8037342 for ; Sat, 25 May 2019 00:38:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4P0c9io037341 for fs@FreeBSD.org; Sat, 25 May 2019 00:38:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 238112] Unable to create ZVOL Date: Sat, 25 May 2019 00:38:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 00:38:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238112 Bug ID: 238112 Summary: Unable to create ZVOL Product: Base System Version: 11.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: eugen@freebsd.org CC: allanjude@FreeBSD.org, fs@FreeBSD.org, markj@FreeBSD.org, mav@FreeBSD.org A colleague of mine is testing his set of virtual machines under FreeBSD 11.2-STABLE using bhyve (sysutils/vm-bhyve specifically) over GELI-encrypted non-boot ZFS pool with multiple ZVOLs and faced a problem. After GELI attached the pool, kernel part of ZFS tastes its internals and writes to dmesg: ZFS WARNING: Unable to create ZVOL sata/vm/ws2019tmplENhalts/C@20190524-225700-before-1st-reboot (error=3D63). The dataset has recommended volmode=3Ddev. In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c the function zvol_create_minor() prepends mentioned long name of dataset with prefix "zv= ol/" and calls make_dev_s() from sys/kern/kern_conf.c that is a wrapper for make_dev_sv() failing with ENAMETOOLONG (63). make_dev_sv() uses prep_devname() that returns this error if total length is more than sizeof(dev->si_name) - 1 that equals to SPECNAMELEN defined to 63= . So ZVOL name length is effectively limited to 58 octets due to "zvol/" prefix. Warning message quoted above is too cryptic for user and this limit is obsc= ure and seems to be FreeBSD-specific. Please change the code to test for ENAMETOOLONG and issue a warning describing the problem more clearly. Also, consider replacing kernel printf() with more useful logging like log(= ) so the warning would hit syslog and get to /var/log/console.log (if enabled) a= nd not dmesg buffer only. --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-fs@freebsd.org Sat May 25 04:27:33 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BA281597968 for ; Sat, 25 May 2019 04:27:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D2FEF8D2A2 for ; Sat, 25 May 2019 04:27:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 895CC1597967; Sat, 25 May 2019 04:27:32 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 751C31597966 for ; Sat, 25 May 2019 04:27:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 006768D29B for ; Sat, 25 May 2019 04:27:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 2821B1F07E for ; Sat, 25 May 2019 04:27:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4RVQ4020947 for ; Sat, 25 May 2019 04:27:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4P4RVFt020946 for fs@FreeBSD.org; Sat, 25 May 2019 04:27:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 238112] Unable to create ZVOL Date: Sat, 25 May 2019 04:27:26 +0000 X-Bugzilla-Reason: AssignedTo CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 04:27:33 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238112 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@FreeBSD.org |fs@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.= From owner-freebsd-fs@freebsd.org Sat May 25 04:27:48 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73149159799F for ; Sat, 25 May 2019 04:27:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 083438D2E4 for ; Sat, 25 May 2019 04:27:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B6A52159799B; Sat, 25 May 2019 04:27:47 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A48901597997 for ; Sat, 25 May 2019 04:27:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 414188D2E1 for ; Sat, 25 May 2019 04:27:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8DEFB1F086 for ; Sat, 25 May 2019 04:27:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P4Rko1021273 for ; Sat, 25 May 2019 04:27:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4P4Rk9d021272 for fs@FreeBSD.org; Sat, 25 May 2019 04:27:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 238112] Unable to create ZVOL Date: Sat, 25 May 2019 04:27:45 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 04:27:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238112 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- CC|fs@FreeBSD.org | --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat May 25 05:04:00 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EF3E159E443 for ; Sat, 25 May 2019 05:04:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CCF928EEC7 for ; Sat, 25 May 2019 05:03:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 8BB4C159E43D; Sat, 25 May 2019 05:03:59 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79636159E43A for ; Sat, 25 May 2019 05:03:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 020E68EEC2 for ; Sat, 25 May 2019 05:03:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 49F321F698 for ; Sat, 25 May 2019 05:03:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4P53wve003163 for ; Sat, 25 May 2019 05:03:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4P53w7s003162 for fs@FreeBSD.org; Sat, 25 May 2019 05:03:58 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 237167] r346059: interface zfsctrl.1 already present in the KLD 'kernel'! linker_load_file: /boot/kernel/zfs.ko - unsupported file type Date: Sat, 25 May 2019 05:03:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2019 05:04:00 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237167 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@FreeBSD.org |fs@FreeBSD.org Keywords| |regression --=20 You are receiving this mail because: You are the assignee for the bug.=