Date: Sat, 5 Oct 2024 07:11:17 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6536b979b856 - stable/14 - pipe: use pipe subsystem KVA counter instead of pipe_map size Message-ID: <202410050711.4957BH2v001151@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6536b979b856096809d46e92039a7a51e0b646d9 commit 6536b979b856096809d46e92039a7a51e0b646d9 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-09-20 11:59:19 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-10-05 07:08:55 +0000 pipe: use pipe subsystem KVA counter instead of pipe_map size (cherry picked from commit d6074f73af5c813524022cf6ee7dab9c4cbe44be) --- sys/kern/sys_pipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 2e5eafee9fa6..380bc165cef5 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -593,9 +593,8 @@ retry: } vm_map_lock(pipe_map); - if (priv_check(curthread, PRIV_PIPEBUF) != 0 && - (vm_map_max(pipe_map) - vm_map_min(pipe_map)) * - (100 - pipebuf_reserv) / 100 < pipe_map->size + size) { + if (priv_check(curthread, PRIV_PIPEBUF) != 0 && maxpipekva / 100 * + (100 - pipebuf_reserv) < amountpipekva + size) { vm_map_unlock(pipe_map); if (cpipe->pipe_buffer.buffer == NULL && size > SMALL_PIPE_SIZE) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410050711.4957BH2v001151>