From nobody Wed Dec 6 23:36:58 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 4Slv231XQkz53BPc for ; Wed, 6 Dec 2023 23:36:59 +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 4Slv224GS9z4HTs for ; Wed, 6 Dec 2023 23:36:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701905818; a=rsa-sha256; cv=none; b=UscVhq4r+h9F1gClBFQOAmmWHzkM7XrZRWHhP8h1S++2d2aYt6cQ1W1mQiE0cOr9woT7YK itYGIMyDcWf5aDgT9NXbP7bw0399bC7iHBI20C9yTVSLn9smqRNziV1Y4JcNZD7ibs8twr 2np4x60BcRpEloYuWOfsthA/NoEhCXHQf4SQC6NBbLxdKhBGTLo7ceAtY//GT+WzIbN6ee mEDNfHmHWtCLqMyr9wx72nZBFuWAbMHzLdl+SB4GWdIbitK2OG618lniKTsEvDY+ASurD9 vF6QVkvbKaGfE6y+1WAwFGSJ4gzrsyYrvE/ZRikvMqGx7MfmWc7ETpA7zK6T2w== 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=1701905818; 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=qIOOOFCD8ihS5Bu2s3d4xUjXqQJSpxapjAs3IToh9rE=; b=fAH+2YR1IYzeI+keaiDcWi+W5TF+XNc15Dr2ps4/nFB0n2vqfbXOH4T7kL3T6wPoJEpjGW AXUMwn9tc3l02JN+eaa0WHNknN9rmoYzZXOFmtxgTiTLYbIGpEZoXzurnqxJwD4Amenbw8 NDyZv88yoOhJO7EqqCyxjmFc2F58BsEOWp/7jUB+R1ETVp91JCy//fXgjv8GbXuQGnXdpo MalSKH6IPqbv11FQULXpKekcXLnq6beiR3MIyuyABQmKkUZZ0Nvaun+bDIVtMaeY/kVyoK chFAuTe1b9f61mtFE2LVQnKV5g/HfEu8CyKlDhSUNt93VT3DkCrS049AwfY0ww== 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 4Slv2236rKz1C2Z for ; Wed, 6 Dec 2023 23:36:58 +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 3B6NawmK022730 for ; Wed, 6 Dec 2023 23:36:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3B6NawdJ022729 for bugs@FreeBSD.org; Wed, 6 Dec 2023 23:36: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: bugs@FreeBSD.org Subject: [Bug 275436] tmpfs does not honor memory limits on writes Date: Wed, 06 Dec 2023 23:36:58 +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: kib@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 #8 from Konstantin Belousov --- (In reply to Mike Karels from comment #7) Being able to free one page is not equal to ability to free needed number of pages, this is why 'global' OOM works only in specific situations. Proposals to limit max tmpfs page uses to some percentage of the total of memory and swap would not work. Problem is that some memory is 'managed', some is not. For instance, all file-backed pages should be considered as free for the purpose of the limits calculation, otherwise an app mapping a large file and reading it would cause un-explanable ENOSPC failures from tmpfs. And in reverse, allowing say 80% of total use by tmpfs does not pre= vent a situation where we do fill that limit, and then kernel needs a lot of unmanaged memory, for instance, for sockets buffers due to bursts of a network activi= ty. There is simply no reasonable answer to question 'how to limit tmpfs physic= al memory consumption' without knowing the system load pattern. And if you kn= ow the load and care about memory limiting, there is already the size option. --=20 You are receiving this mail because: You are the assignee for the bug.=