From owner-svn-src-all@freebsd.org Thu Aug 30 13:42:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45687109EEA2; Thu, 30 Aug 2018 13:42:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0BD0810FA; Thu, 30 Aug 2018 13:42:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B0C5433; Thu, 30 Aug 2018 13:42:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7UDg1ee053580; Thu, 30 Aug 2018 13:42:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UDg1IT053579; Thu, 30 Aug 2018 13:42:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808301342.w7UDg1IT053579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 30 Aug 2018 13:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338395 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 13:42:02 -0000 Author: markj Date: Thu Aug 30 13:42:01 2018 New Revision: 338395 URL: https://svnweb.freebsd.org/changeset/base/338395 Log: Re-add kstat.zfs.misc.arcstats.other_size under COMPAT_FREEBSD11. It is used by a number of applications, notably top(1). Reported by: netchild Reviewed by: allanjude Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16943 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Aug 30 13:29:32 2018 (r338394) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Aug 30 13:42:01 2018 (r338395) @@ -661,7 +661,13 @@ typedef struct arc_stats { * Number of bytes consumed by bonus buffers. */ kstat_named_t arcstat_bonus_size; +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) /* + * Sum of the previous three counters, provided for compatibility. + */ + kstat_named_t arcstat_other_size; +#endif + /* * Total number of bytes consumed by ARC buffers residing in the * arc_anon state. This includes *all* buffers in the arc_anon * state; e.g. data, metadata, evictable, and unevictable buffers @@ -875,6 +881,9 @@ static arc_stats_t arc_stats = { { "dbuf_size", KSTAT_DATA_UINT64 }, { "dnode_size", KSTAT_DATA_UINT64 }, { "bonus_size", KSTAT_DATA_UINT64 }, +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) + { "other_size", KSTAT_DATA_UINT64 }, +#endif { "anon_size", KSTAT_DATA_UINT64 }, { "anon_evictable_data", KSTAT_DATA_UINT64 }, { "anon_evictable_metadata", KSTAT_DATA_UINT64 }, @@ -6825,6 +6834,11 @@ arc_kstat_update(kstat_t *ksp, int rw) ARCSTAT(arcstat_bonus_size) = aggsum_value(&astat_bonus_size); ARCSTAT(arcstat_dnode_size) = aggsum_value(&astat_dnode_size); ARCSTAT(arcstat_dbuf_size) = aggsum_value(&astat_dbuf_size); +#if defined(__FreeBSD__) && defined(COMPAT_FREEBSD11) + ARCSTAT(arcstat_other_size) = aggsum_value(&astat_bonus_size) + + aggsum_value(&astat_dnode_size) + + aggsum_value(&astat_dbuf_size); +#endif ARCSTAT(arcstat_l2_hdr_size) = aggsum_value(&astat_l2_hdr_size); }