From nobody Fri Aug 06 09:26:31 2021 X-Original-To: bugs@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 3A82E10FE310 for ; Fri, 6 Aug 2021 09:26:31 +0000 (UTC) (envelope-from bugzilla-noreply@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 4Gh0Tz122lz3p1P for ; Fri, 6 Aug 2021 09:26:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 076CF28FA for ; Fri, 6 Aug 2021 09:26:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1769QUqK079584 for ; Fri, 6 Aug 2021 09:26:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1769QUHs079583 for bugs@FreeBSD.org; Fri, 6 Aug 2021 09:26:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 257641] hwpmc/libpmc needs to gain a notion of big.LITTLE Date: Fri, 06 Aug 2021 09:26:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: se@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257641 Stefan E=C3=9Fer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |se@FreeBSD.org --- Comment #1 from Stefan E=C3=9Fer --- Maybe the best solution is to just have a per-core check for validity of the requested PMC and verify that it is available on *all* CPUs in the applicab= le cpuset. You can deal with both system-scope and process-scope PMCs in exact= ly the same way, then. This will obviously require a list of supported PMC register number ranges = per architecture attached to the per-core data. By formalizing a format (e.g. a range of start,end values) the check could become MI. For process-scope PMCs the user has to explicitly specify a cpuset that excludes the cores that do not support the PMC, giving him full control over the measured setup. If the process is not bound only to cores that support = the PMC, the request must be rejected.=20 An implicit cpuset() to limit the process-scope PMC to use just those cores that support some particular PMC might give surprising results, since the u= ser might compare different runs with different PMCs without being aware that s= ome of them were measured on a limited set of cores and the others on all cores. In the case of system-scope PMCs you may be able to request one PMC on cores that support it and another less optimal PMC on cores that don't. To support such a use case, the selection of cores to use for the measurement should a= gain be explicit and based on core numbers (i.e., not just implicitly based on whether a core supports the requested PMC). In either case I'd reject the request if not all selected cores (cpuset of = the process to monitor, currently active cpuset, or cores selected by the -c op= tion of pmcstat) support it. It might be a good idea to somehow report the supported PMCs to the userlan= d by means of dev.cpu sysctl variables. These could either identify the core architecture or just provide a list of supported PMC register numbers as a string (e.g. in the style of "1,5-10" or perhaps as a list of register name= s). That would make it possible to list the core numbers that allow some specif= ic measurement, for example, without the user remembering all details of the C= PU. --=20 You are receiving this mail because: You are the assignee for the bug.=