From nobody Tue Dec 19 15:34:26 2023 X-Original-To: bugs@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 4SvgjH0kCMz54R1j for ; Tue, 19 Dec 2023 15:34:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SvgjG54s9z3FbD for ; Tue, 19 Dec 2023 15:34:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703000066; a=rsa-sha256; cv=none; b=tAHcx+oOd7uLCH+3HkIJz+d7FeiuF7Tl21qXf0x9uqh52MOee0ig8cf70GTdZLuWK0hBto MsIkdjDxOYqOm1boVUsrm8XTZM6cr3px9z/9vcTm+YQqKKxCDHOc780ZxgpuGXdqnbFZef 9AIwIqvTiScxIfyct0zpB5cyQL4cf3/I1Z6InePMrZ0AvE4diTImmJ2Q9bp8EaYXZrgUKt tavOIYOEEq2TZ4GBGdnfENK2jiN48gplSFy8gtO5OpfY0DMkiuO61SzCqKyd3QK5PMcOBo Vbz/i/mFcRyzHmjQPmsDA7vSSLm9VBZThcsFBm8LYzoYoe6PzysP+X5Cq1dEIQ== 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=1703000066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+gkQW1n24d7V32X9FfEAiM5V2/0eK52a0DP+msJX/aM=; b=Gk9k4y6Lfamt73dYHU0dM3fJHtHhGwtEx9Vi9AITel3Oj9VKqTVCbL3CMbwqWQGiL+A67z aOLtEGIS4S+SsL7+lr0VbdoBz3HCFyoWu+uVWj6ZDOSI8+kekPVqjhBJqgdfaVxOL28w0g 4A3s0V6l9KgygDK0e373IqvF0znJ48l5fw2reTg3iWyzznzFaAtwQvWz42atm4ZGBsypK0 1ir5ll2Jxmqv8afhz8wghEBr7lYTRUVpI7GNvB/FM/KSbEYyJPYSQbzPkEwbfH3JTXywRu 33he0VC/yUf0JJCCLtQwcIDH+Xrxi8NuEfuBh5AtOjpYZ75s34OIol4KkSVt1g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SvgjG3Zmdz19H6 for ; Tue, 19 Dec 2023 15:34:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3BJFYQD2027619 for ; Tue, 19 Dec 2023 15:34:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BJFYQAU027618 for bugs@FreeBSD.org; Tue, 19 Dec 2023 15:34:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275436] tmpfs does not honor memory limits on writes Date: Tue, 19 Dec 2023 15:34: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: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@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: 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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275436 --- Comment #14 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D636592343c3ec0feb61a4d80436763813= 84420dd commit 636592343c3ec0feb61a4d8043676381384420dd Author: Mike Karels AuthorDate: 2023-12-19 15:33:33 +0000 Commit: Mike Karels CommitDate: 2023-12-19 15:33:33 +0000 tmpfs: increase memory reserve to a percent of available memory + swap The tmpfs memory reserve defaulted to 4 MB, and other than that, all of available memory + swap could be allocated to tmpfs files. This was dangerous, as the page daemon attempts to keep some memory free, using up swap, and then resulting in processes being killed. Increase the reserve to a fraction of available memory + swap at file system startup time. The limit is expressed as a percentage of available memory + swap that can be used, and defaults to 95%. The percentage can be changed via the vfs.tmpfs.memory_percent sysctl, recomputing the reserve with the new percentage but the initial available memory + swap. Note that the reserve can also be set directly with an existing sysctl, ignoring the percentage. The previous behavior can be specified by setting vfs.tmpfs.memory_percent to 100. Add sysctl for vfs.tmpfs.memory_percent and the pre-existing vfs.tmpfs.memory_reserved to tmpfs(5). PR: 275436 MFC after: 1 month Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D43011 share/man/man5/tmpfs.5 | 18 ++++++++++++++++++ sys/fs/tmpfs/tmpfs.h | 8 ++++++++ sys/fs/tmpfs/tmpfs_subr.c | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=