From nobody Tue Nov 08 07:15:48 2022 X-Original-To: freebsd-arm@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 4N5zsM4pTPz4gd1X for ; Tue, 8 Nov 2022 07:15:51 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5zsM42Mwz3PPV; Tue, 8 Nov 2022 07:15:51 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667891751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Or51i8cs02hJr0iZUhoJW0+EdAXo1l2qDL0IjYkUm7Y=; b=pRRgz+24P6TScfM8qRl7rnfrIOZLieq3fFdtAu6GcNOTnvvbvWojwbAP23EgDX7VY8p3w8 UjN4aa1b2ew+kJf7ts0dAXBOvsQnFTGzXOiM7Z1wts1qfLbtaIFsc4kUyQ8uJPHe8vdIXP 6zNseuTznK5JSQ4sSTX0hNggQwmt0KnazvpnL59w8is73onDOeizUlqyWEUu/MdC4g61rK oJTlBX1NzA3acaIeWXHgwV2Tet2Dp7p7A+zswT00S6H10x+78/cSNTqO8m7le6zhe9F3xU MB+jeHo3PIyOgzph4i5DSXrtcfJXozuVEXNB6wHdermJf9J/gJTskJ0jX/PaiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667891751; a=rsa-sha256; cv=none; b=fs0BoJwg7BDSvFSCo8oAdkgzGQ4Tw3eCMxLHdOswU0Lht5bFeqi6bUXhgiBirE+OveZ/YG AdbWDeus1fYmYaMv9nof/zbLlQGXs4iG00CX8zhWuGNFz7yY/up3R3f6uNpYQY6emNcEi0 vpyvU597TlY1m19LpCwzDPRhpvJbmlmsEGGzf+PFz7OJHBkA/iqtQpMA7fsl3WDgyzp8H1 XeNPXHNxXp9Ao6GoK/4r6qGhix51cc6FizR84VRM627hI67Sr2DRjrWj++Jbmf6bKHcni/ yePdkxe/tHE4D/qw/D0JkEEcvWS1j/rXfy8LgXPXV1jEZOLOW4Ha0vLjeaz5oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667891751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Or51i8cs02hJr0iZUhoJW0+EdAXo1l2qDL0IjYkUm7Y=; b=JpSrnlhAS4wGhYe1khqnhVJF+oDIPKZZLrKRJUdmov76KLzZWE29xcXvgnFOJGVjo1bwoh Tl6aMgXExTG+HgoOe+qDIKQNT4gp52LdzK6HPSfYoL9ncv+LpBpiGkDm/Ds8wUJELBfCZW yjHih72NlVB8fM3bD4UIAlYMCKN+L7/Si8qNTLHWAORtXF8+IhGKW1hdvIPnEjcQ1nPbL+ d9rrb9V90DYGYMSzrJtG0562QyyBLBO1eW7q9XAcp+3Pw1iwzJpS4cvt1N9sSt/2osEC9h Tqceao+00i+gyiTHe+yL3f2vWI/69pwHAGmpW90yw6VUN+eXVBAq9RBye0pWXw== Received: from localhost (p200300cb870da5a0f04891b19e02c4c8.dip0.t-ipconnect.de [IPv6:2003:cb:870d:a5a0:f048:91b1:9e02:c4c8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N5zsL74lLznrj; Tue, 8 Nov 2022 07:15:50 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Tue, 8 Nov 2022 08:15:48 +0100 From: Gordon Bergling To: Mike Karels Cc: freebsd-arm@freebsd.org, jmg@freebsd.org Subject: Re: adding swap when expanding root filesystem Message-ID: References: <202211071610.2A7GAcHl090048@mail.karels.net> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aelShEj1XRrBDTia" Content-Disposition: inline In-Reply-To: <202211071610.2A7GAcHl090048@mail.karels.net> X-Url: X-Operating-System: FreeBSD 13.1-STABLE amd64 X-Host-Uptime: 8:08AM up 3 days, 15:34, 3 users, load averages: 0.44, 0.30, 0.24 X-ThisMailContainsUnwantedMimeParts: N --aelShEj1XRrBDTia Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Mike, On Mon, Nov 07, 2022 at 10:10:38AM -0600, Mike Karels wrote: > This question is not really arm-specific, but I couldn't think of a better > mailing list for it. >=20 > There are peridic issues reported on small systems like Raspberry Pi > where people are running buildworld or poudriere and running out of > memory. As the user gets no control over the disk layout when installing, > there is no option to add swap space on the install image. I have added > swap space on a USB disk, but this is often not an option. It occurred > to me that it might be reasonable to add swap space before expanding > the root filesystem if there is sufficient space. I have a prototype, > and wondered if this is a good thing to do. Granted, this will often > create swap on microSD, which is not optimal, but probably better than > nothing. >=20 > The current prototype creates a swap partition which is 1/10 of the disk > if the disk is at least 15 GB and the initial root partition is no more > than 1/3 of the disk, but only up to 1.5x of physical memory. I would > probably enable this by default, but provide a way to disable it via a > kenv variable and/or a variable in /etc/rc.conf. >=20 > Thoughts? >=20 > Mike That would be very welcomed addition. I personally ofter run into problems when I try get a crash dump from my RPi4, since no dumpdev can be set without a separate swap partion. An USB stick worked for I while, but it just went dead at some point. And the genet(4) driver doesn't support netdump(4). --Gordon --aelShEj1XRrBDTia Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAmNqAiJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYx QjU4OEQwQTYzOTVGQkM4N0ZDNUNCODM5MDVGNjU3Q0FDRkQzREMACgkQOQX2V8rP 09ztxggAnCQ2fqydmfBO9VsiTHYNh4tSlJpK8LNL7sMh+mdhFakjZPQtlmt8+Nnc xEqQpJ2xA/ceJtS5ROLRX/7VOVhUGBys0EjkyKnff+NgCCiK1pUMV37BzfMy6MiV 8eycQuCPfl2kOnXCCC9NUUvQawgM5lPwEyqInrXUQMjOsO/GDo/5yJ3xRioDLPE6 yIhgL1OjYxDuhXu2926gRUQ31FdRnj1GC3RYXc70xWhuesmb5ZwnqPcxjfeeZwpc vhWBwK0lw4MJgRPa+tAKcctWuSMIXGLxT6OEBcT6MvwrF+ga9em+amKP7JlCJa9f TUAquQuWw3AX9MEXL+jb4Jv54DKAwA== =frm+ -----END PGP SIGNATURE----- --aelShEj1XRrBDTia--