From nobody Thu Jun 2 17:08:27 2022 X-Original-To: freebsd-dtrace@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 C31B118DF130 for ; Thu, 2 Jun 2022 17:08:31 +0000 (UTC) (envelope-from pete-fbsd@hiddenrock.com) Received: from menegroth.hiddenrock.com (menegroth.hiddenrock.com [72.14.176.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4LDXXb138Lz3KxQ for ; Thu, 2 Jun 2022 17:08:28 +0000 (UTC) (envelope-from pete-fbsd@hiddenrock.com) Received: from vingilot.hiddenrock.com (localhost [127.0.0.1]) by menegroth.hiddenrock.com (Postfix) with SMTP id 479C720083 for ; Thu, 2 Jun 2022 13:08:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hiddenrock.com; s=default; t=1654189700; bh=1t/Py9E6o4bPoS+qPUpwF4sW235ZPbiK/dWiZu1HMk4=; h=Date:From:To:Subject; b=muAIADjiilZRjTWHheajeYvvyVnQDho51XeKnT5aBR6B/kCOuJ0ofXs0wMqbL9pCj 63PnjFU2K2TrRSOUZ7LPg+MqS9DRd7LdwjcrbbhZfpVOl9ADCSPgJWHGDTyJTkNJn5 b4bc5dJVYpz26/1laVhFadMQYFHwH3EX1TpBEzSc= Date: Thu, 2 Jun 2022 13:08:27 -0400 From: Peter Johnson To: freebsd-dtrace@freebsd.org Subject: vminfo provider for FreeBSD Message-ID: List-Id: A discussion list for developers working on DTrace in FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-dtrace List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-dtrace@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4LDXXb138Lz3KxQ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hiddenrock.com header.s=default header.b=muAIADji; dmarc=none; spf=pass (mx1.freebsd.org: domain of pete-fbsd@hiddenrock.com designates 72.14.176.147 as permitted sender) smtp.mailfrom=pete-fbsd@hiddenrock.com X-Spamd-Result: default: False [-3.40 / 15.00]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[hiddenrock.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63949, ipnet:72.14.176.0/20, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[hiddenrock.com:s=default]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-dtrace@freebsd.org]; DMARC_NA(0.00)[hiddenrock.com]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-dtrace]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N Hi there -- I would find the probes in Illumos' vminfo provider [1] really handy to have in FreeBSD and I'm happy to do the work to make it happen. The only FreeBSD-related mention of the vminfo provider I can find is an old mailing list post [2] that I interpret to mean that the existing fbt probes aren't a meaningful alternative (not to mention that using fbt probes effectively requires more understanding of the source code than is perhaps desirable given DTrace's intended purpose/audience). My first question is: would such an addition be welcome? I can make a more detailed case for its inclusion if that would be helpful/persuasive. If it is welcome, my plan would be to get very well-acquainted with FreeBSD's VM subsystem, identify where each of the vminfo probes described in the Illumos documentation should go, and then develop a patch to add those probes, seeking feedback from both freebsd-dtrace folks and whichever group has dominion over the VM stuff. My second question is: does this sound like a reasonable plan? It is, admittedly, almost uselessly high level, but I expect I will need more than a little familiarity with the codebase before I can get more specific. Given the mailing list post I mentioned above, it seems possible that some of the vminfo probes described in the Illumos documentation don't make sense in the context of FreeBSD (eg, if FreeBSD doesn't have a distinct paging daemon, then the pgrrun, rev, and scan probes aren't suited for transfer). On the other hand, there may be aspects on the FreeBSD side which would be beneficial to monitor, but for which Illumos does not define probes. Therefore, my third question is: how important is it for a vminfo provider implementation in FreeBSD to hew closely to the Illumos implementation? Would it be acceptable to not transfer some probes that don't make sense and add some new probes that do? Documentation is obviously vital for any deviations, and I will make darn sure to make it a central part of the work. Any and all feedback is most appreciated. Thanks. pete [1] https://illumos.org/books/dtrace/chp-vminfo.html [2] https://lists.freebsd.org/pipermail/freebsd-dtrace/2014-April/000209.html