diff --git a/doc/changelog.rst b/doc/changelog.rst index 1219366b..cb95707f 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,12 @@ Changelog ========= +Version 2.12.0 (unreleased) +--------------------------- + +* Bugfix: Remove the Linux version check, which was broken and no longer needed. + Patch by Michael Greenberg. + Version 2.11.0 (2026-11-08) --------------------------- diff --git a/pyperf/_system.py b/pyperf/_system.py index d0f8e526..2d66f432 100644 --- a/pyperf/_system.py +++ b/pyperf/_system.py @@ -437,7 +437,6 @@ def available(): def __init__(self, system): super().__init__('Linux scheduler', system) self.ncpu = None - self.linux_version = None def show(self): self.ncpu = get_logical_cpu_count() @@ -445,21 +444,8 @@ def show(self): self.error("Unable to get the number of CPUs") return - release = os.uname()[2] - try: - version_txt = release.split('-', 1)[0] - self.linux_version = tuple(map(int, version_txt.split('.'))) - except ValueError: - self.error("Failed to get the Linux version: release=%r" % release) - return - - # isolcpus= parameter existed prior to 2.6.12-rc2 (2005) - # which is first commit of the Linux git repository self.check_isolcpus() - - # Commit 3fbfbf7a3b66ec424042d909f14ba2ddf4372ea8 added rcu_nocbs - if self.linux_version >= (3, 8): - self.check_rcu_nocbs() + self.check_rcu_nocbs() def check_isolcpus(self): isolated = get_isolated_cpus()