From nobody Sun Feb 26 13:42:49 2023 X-Original-To: dev-commits-src-main@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 4PPlF54CSqz3tcGv; Sun, 26 Feb 2023 13:42:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PPlF53g9Qz3R46; Sun, 26 Feb 2023 13:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677418969; 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=7Zn40rxbh2CHaYlqeFPi8IqY56AK2tnsgTYaQgk+nzI=; b=Wg46gXUTozV4AU27tftpUCX/MbTxJR3WpEQva0QUgHMdc5X0NK65egp/GGAol3tgPSsB9j pVaefFm6Y/8BpYo+is1czTm3QNDBA9ETnG6OKTzy5CSzXigBUVfiNLDOK5CZvW516Tu9W3 iz/pDAF8KdnpZqVcGa99qaJMYHLKl9pxNxsHeInyH/P7lZr191ACmQStqmNeqbG3PQkvgt j6p24iL97t60E4frr695Qc2znXEQKKPJgK8TNvnykwx4u5cGV8S16XAvb/bG3uceunUIuw uz2kzXx/pkTXoHwOKGJYtnWZ2j3SZ6oS4BoyrqOZsHsMpZupYcjvHfO2mtkakg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677418969; 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=7Zn40rxbh2CHaYlqeFPi8IqY56AK2tnsgTYaQgk+nzI=; b=lf1B6d/EX5rHQf8GD7LwAg0906Ui9HdDTgEoGVztoYCqYwqd0qZqHlvBV2G4vvJgDS0dvc NSy+g5+2EYyuPIoUvMzrc68BQp6lqn24qMQvvmDsPnNQ2/4pxm49g578ccCGewQUXzRxvL 7acExdrKoehr4CS04cXHXgUJS/dyE1Yx00+Fcml0HGn2BOk2PANLXl0shzmp8hVYoVfx2W RHqKq06FQJUD5iF5lDBt5MvlouONWDEf2YyorHBDAI83H8ewxY1as3Fv1c1GL0nP5/Btr3 pH98WglTnS6srLmcjzIS7WirBPuxIsX1mo2bp5mLyzj+chc3GTYGJlFLJw9zvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677418969; a=rsa-sha256; cv=none; b=osNSyC+TmidgPX7Hni3augvAL7CQxuwzr2pJpcW+RrefBL/z1whxLm/CLbGhTya2tMlmZS T2o+D3ZKaWVc6Bb30NGFuSLKekPw0ehpXoQvKaSrhT5ChSbIpX+oPylmu6u1+Q6uDaCzXX RgW74/eQLrLq/uSPCuNWhgZo1LRCO9mYD1KjLJqF6/3C+/KIzffBLjAv03h345zrDKZesB H3MR++EIbwWKTR+CvjmJB9zFp3zrT1CXb0rsetTrBTiv1sNXdwWhyQ3pjsjjW5Jsi/9G6I g8qTdcq1Po9pykcsy30S8a/EZnMqvAFTcdb54vcKkYuIskhR88cnP2KlWZDLZw== 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 4PPlF52kvdznNH; Sun, 26 Feb 2023 13:42:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31QDgnR3026132; Sun, 26 Feb 2023 13:42:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31QDgndp026131; Sun, 26 Feb 2023 13:42:49 GMT (envelope-from git) Date: Sun, 26 Feb 2023 13:42:49 GMT Message-Id: <202302261342.31QDgndp026131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: a55b5a9aed39 - main - linprocfs(4): Fixup process size in the /proc/pid/stat file List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a55b5a9aed3981fcec205e246436991d138c78a2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a55b5a9aed3981fcec205e246436991d138c78a2 commit a55b5a9aed3981fcec205e246436991d138c78a2 Author: Dmitry Chagin AuthorDate: 2023-02-26 13:42:22 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-26 13:42:22 +0000 linprocfs(4): Fixup process size in the /proc/pid/stat file According to the Linux sources the kernel exposes a proces virtual memory size via proc filesystem into the three files - stat, status and statm. This is the struct mm->total_vm value adjusted to the corresponding units - bytes, kilobytes and pages. The fix is based on a fernape@ analysis. PR: 265937 Reported by: Ray Bellis MFC after: 3 days --- sys/compat/linprocfs/linprocfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 83b00dc0d7c2..d57c546eb637 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1023,7 +1023,7 @@ linprocfs_doprocstat(PFS_FILL_ARGS) PS_ADD("0", "%d", 0); /* removed field */ PS_ADD("itrealvalue", "%d", 0); /* XXX */ PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - TV2J(&boottime)); - PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); + PS_ADD("vsize", "%ju", (uintmax_t)kp.ki_size); PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); PS_ADD("startcode", "%ju", (uintmax_t)startcode);