Date: Sun, 03 Dec 2023 08:04:51 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275436] tmpfs does not honor memory limits on writes Message-ID: <bug-275436-227-i18iboIrgo@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-275436-227@https.bugs.freebsd.org/bugzilla/> References: <bug-275436-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275436 --- Comment #6 from Konstantin Belousov <kib@FreeBSD.org> --- VM (alomst) always ensures that there are several free pages. More, it even typically manages to free several pages in reasonable time. This is why our OOM organized in current way: - global OOM triggers when VM cannot get a free page despite existence of t= he page shortage, in all domains, for some time. It is typically triggered when kernel allocates too much unmanaged pages (not tmpfs case). - per-process OOM triggers when page fault handler needs a page and cannot allocate it after several cycles of allocation attempts. I added the second (per-process) OOM since global OOM (similar to your patc= h) was not able to handle typical situation with usermode sitting on too many dirty pages. Now that I formulated this, I think that for tmpfs a reasonable approach wo= uld be something in line of per-process OOM: try the allocation, and return ENO= SPC if it failed, with some criteria for restart. You might look at vm/vm_faul= t.c vm_fault_allocate_oom(). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-275436-227-i18iboIrgo>