From nobody Sat Oct 05 07:11:17 2024 X-Original-To: dev-commits-src-all@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 4XLGmR0Ysxz5XrRh; Sat, 05 Oct 2024 07:11:19 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmP2Qg3z4NNv; Sat, 5 Oct 2024 07:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112277; 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; bh=CF9xFNOUrJJlLg2uEOkJ0Rl2ZjPjWPse0JCHC+ielwg=; b=mBqzuk2XWzj6SY8YYjkSXzXUsBU45Do9bbapRyGzh4tORnfrX2YHDF0ymLZTUY11mZxXm3 7XhgpMVoLK2PZdDLPYFjyBWISMQNFW4g7xiUFB8DlzbOAm6S4wtrHN5jXDGx41HhMdQm5x ouByBJFRDsngqpHS2DgTeNnpGzF9mOz0XrweQevNcp0rVeB33HmCrFDDyZB3+LSfgHf5SO TQESQzWrtKzVx/wBNJAYnQ8rWcM3vkGzQBWgTUkZCP3z4xfxl1RFaQ7DH+eRgjEhpskFXI 7rPbESGetPPLsZXbDVTAd5QCQ0EpU0EzmgAKI1v3SSh3GCIul08ZniIKMG9kwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112277; 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; bh=CF9xFNOUrJJlLg2uEOkJ0Rl2ZjPjWPse0JCHC+ielwg=; b=AIhSQA8BUem6bJngOj95nTzuczm73PyHuSv2HWobO8VJDK4g4jAGOD8fBgNQWt1V42jqiV b+n4b2TGwIY6iQRmuygbRCgJHWs3gvXZp2hpgbm3ZYEbdh8N18ChWp+s+gwL8gPdd+5sC/ UDIyp0j+MUFb+aqUzNgwwKjfdejjBb8ODDFXAXFL0Zaa6omJarKcTq5rZOsZy73ya+nkUk pVdx/ts5N3RtiOO/t0RFpvdin5Mi13qqf+tEV90tPT/r0ciTJuWChNE3C4PZO/SpcIEyEW znTJ79TzoGOFFODMHBUe0/bXu5Tpzw9lpxzPW40tmwpUmTWBUt0xIHAClzLywA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112277; a=rsa-sha256; cv=none; b=JvWISdFZeo+LnLcyKG1jqAo3PAqJ0L3ML2HyDFW1Q/AXDM7KltrLef2/o/bL6NnVbvvwcc XoYFTSVOZ49RgFrUgiA+WSe2fWzhviHjOVNRSGQsgAMBr3kdZ6Ytn7Vh3oeRSSyjhCZbUC InvtKpM1L+R19lz/Yd6QHxtAKgCiM/waVl0oENn3tfdSGG0OGAyOMiXxs83ZJTkjX36l5U rUEGQh1mcGZmL6oCLdp6X5Q42ii/meZaBmmWGewGZFcbSBIaENe0pk0/jDWpOjgkHT2yD2 gLBoaaQIcncWUh2//EJ2QUB3wHBFOLk4JvSmvyMR3BgyPXyz09at3vls6lEzwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4XLGmP1sHsz17pH; Sat, 5 Oct 2024 07:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4957BHQB001154; Sat, 5 Oct 2024 07:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BH2v001151; Sat, 5 Oct 2024 07:11:17 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:17 GMT Message-Id: <202410050711.4957BH2v001151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6536b979b856 - stable/14 - pipe: use pipe subsystem KVA counter instead of pipe_map size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6536b979b856096809d46e92039a7a51e0b646d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6536b979b856096809d46e92039a7a51e0b646d9 commit 6536b979b856096809d46e92039a7a51e0b646d9 Author: Konstantin Belousov AuthorDate: 2024-09-20 11:59:19 +0000 Commit: Konstantin Belousov 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) {