From nobody Sun Jun 09 18:43:31 2024 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vy3jt4Lp4z5N7nb for ; Sun, 09 Jun 2024 18:43:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vy3js1x7kz4lWS for ; Sun, 9 Jun 2024 18:43:45 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=dydmgtep; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717958623; bh=c0IUb4BNrnb+WotNwdToXAwAXBNYN4x4JwYJJfo50XM=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=dydmgtepvNxQnHQSWjbyn1gRIC6EG2YkP+hGy69Qs9wneQEH63XjJAqjloqudYgUjB5aeIbfwQ+ZEeF3QZMFYZxq4VRzi/njwF2Q9wkxlR3gEA0ol2I9YsH6qhH8vdyP+Q3p7cfCAeZhlW/XoiYWy15sOo1QmVNwh40jicf0zYiJ2uSk4Vh/W76SgBnNW2xKf+KprdBJgC1n6tf2ZCbrit6A8BHYopQxWTXQI9anjmU9bF9MULHi6TdxEo4L2c15M4R2n3K+qXMe2rdpZ60Uj27vLvFY7nFEV+unOqtqriTkfeUg4HMZFtL2MvW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6eANNGokn_z2F3GUWCayKAE4wLHwZanldM31c3j9zpHpq.04cVpNzz4GEPPuL GZA3P58Fxv6isru8wSiakCuiwLdFQeL6Ens8P5U3nrQQWieFJYKWIU.NmaM2FfjaC4Pyj3WZBv.2 Nw1CnnMZhiPDjeT62j6mgj1OPUS27wWP18DENBENELJG.1SCoPC9eLHHY67Yo1vnDcReNYzvZofw zU1CsMX0MnChxS0HHkVkRyR64Zj48y5aMeP0kOjNTou183d6N26x717fNv5jEh9m26ejEcdFNRSA MOKwCDQfB5hDo0coL8oOUk.JXlI86YvoOwMnZMRwXQF4rbAgTzLjFOVKOLY.5eGyMtwfoj43k5KT cZ3AbAVuGUMvNksqvKAfoi8PafCpmHcDyauaqTZ_aXFqiM1uyNcpwBdggYU0COAgPp.soP8T.hE. CZg4ycHkBKzdjsP6OlFzvfxmPBPjA21knqIEl2R7ncTUp7Mew24IhDGz3eNVmwM4gsQ9_dv1RonI VJajYRtcGHSRhgUPOWEDwoeXhgpv4rZLBoYJJ03IuoVUm5fbzFp3QIy1dUa13EU_gbZqmJUOmYGH xeu6tOhKuIK1qU5HT2FEXBCSG4u_ltSL_yf6Joxu39ibnItT0UP3BbY_O6Ob2ggdVbe.FSvsJ01b snrJkinOI0mSNGo.pBBsTnrjON5eTXjCAS0Cug6pzjg5qofELyD7_88WBvxBPxR4ynlQ6FCiRScb tJg-- X-Sonic-MF: X-Sonic-ID: acadf5f7-4996-4c28-913f-ac384780aa28 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sun, 9 Jun 2024 18:43:43 +0000 Received: by hermes--production-gq1-59c575df44-qrd65 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 822bf0278795a22cba1f5c3773183ee9; Sun, 09 Jun 2024 18:43:42 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: RE: FreeBSD 14-0 file swapping broken. Message-Id: <57289526-E960-4999-8F9E-57B003201154@yahoo.com> Date: Sun, 9 Jun 2024 11:43:31 -0700 To: artemhevorhian@gmail.com, FreeBSD-STABLE Mailing List X-Mailer: Apple Mail (2.3774.600.62) References: <57289526-E960-4999-8F9E-57B003201154.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.77 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.77)[-0.766]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.146:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.146:from] X-Rspamd-Queue-Id: 4Vy3js1x7kz4lWS Artem Hevorhian wrote on Date: Sun, 09 Jun 2024 15:30:21 UTC : > I would like to report that, likely, in FreeBSD version 14.0-stable, = file > swapping is broken. To confirm, here is what I tried to do and what I > achieved. In order to reproduce the problem, please follow the = following > steps. >=20 > I was following this tutorial > https://www.cyberciti.biz/faq/create-a-freebsd-swap-file/ >=20 > I created a large swap file (8192 MiB) and saved it to = /root/swap.8G.bin. >=20 > After that, I ran >=20 > sudo chmod 0600 /root/swap.8G.bin >=20 > After that, I updated fstab by adding the following line to the end. >=20 > md42 none swap sw,file=3D/root/swap.8G.bin 0 0 >=20 > On running >=20 > sudo swapon -aq >=20 > I got the swap file working initially, and I saw it after running = swapinfo. > But on reboot, it disappeared. Going a different direction than how to enable using of swap files is = the following. It is not FreeBSD version specific for any supported version (RELEASE or STABLE) or for main [future: 15.*] and has a long history = going back into now long unsupported versions. QUOTE ( of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206048#c7 = ) On 2017-Feb-13, at 7:20 PM, Konstantin Belousov = wrote on the freebsd-arm list: . . . swapfile write requires the write request to come through the filesystem write path, which might require the filesystem to allocate more memory and read some data. E.g. it is known that any ZFS write request allocates memory, and that write request on large UFS file might require allocating and reading an indirect block buffer to find the block number of the written block, if the indirect block was not yet read. As result, swapfile swapping is more prone to the trivial and = unavoidable deadlocks where the pagedaemon thread, which produces free memory, needs more free memory to make a progress. Swap write on the raw partition = over simple partitioning scheme directly over HBA are usually safe, while = e.g. zfs over geli over umass is the worst construction. END QUOTE Summary consequence: I recommend only using swap partitions, not swap files. Yes, I have suffered deadlocks from attempted swap file use, with just UFS over umass (USB SSD) being what held the the swap file in question. =3D=3D=3D Mark Millard marklmi at yahoo.com