Skip to content

fix: pkg/hwapi: close fd on each iteration in ReadMSR#16

Merged
micgor32 merged 3 commits intomainfrom
msr
Feb 17, 2026
Merged

fix: pkg/hwapi: close fd on each iteration in ReadMSR#16
micgor32 merged 3 commits intomainfrom
msr

Conversation

@micgor32
Copy link
Copy Markdown
Contributor

@micgor32 micgor32 commented Feb 5, 2026

Since the contents of MSRs is stored in ret anyways, we can make a syscall to close a MSRs' fd, otherwise we are likely to hit the limit of open files per process (i.e. 'ReadMSR - gomsr.MSR context aborted with: too many open
files').

Since the contents of MSRs is stored in ret anyways, we can make a syscall
to close a MSRs' fd, otherwise we are likely to hit the limit of open files
per process (i.e. 'ReadMSR - gomsr.MSR context aborted with: too many open
 files').

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
Comment thread pkg/hwapi/msr.go
@micgor32 micgor32 merged commit 17d765c into main Feb 17, 2026
2 of 5 checks passed
micgor32 added a commit that referenced this pull request Feb 17, 2026
ReadMSR returns uint64 instead of an array of uint64 since #16.
Previously, we read first element of the array (corresponding to core 0),
now since ReadMSR only reads of MSR of core 0, we can just work with
the value it returns.

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
micgor32 added a commit that referenced this pull request Feb 17, 2026
ReadMSR returns uint64 instead of an array of uint64 since #16.
Previously, we read first element of the array (corresponding to core 0),
now since ReadMSR only reads of MSR of core 0, we can just work with
the value it returns.

Signed-off-by: Michal Gorlas <michal.gorlas@9elements.com>
@micgor32 micgor32 deleted the msr branch February 17, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants