mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Bump c/storage v1.58.0, c/image v5.35.0, c/common v0.63.0
Bump: c/storage v1.58.0 c/image v5.35.0 c/common v0.63.0 In preparation for Podman v5.5.0 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
5
vendor/github.com/containers/common/pkg/sysinfo/numcpu_windows.go
generated
vendored
5
vendor/github.com/containers/common/pkg/sysinfo/numcpu_windows.go
generated
vendored
@@ -3,6 +3,7 @@
|
||||
package sysinfo
|
||||
|
||||
import (
|
||||
"math/bits"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
@@ -22,7 +23,5 @@ func numCPU() int {
|
||||
if ret == 0 {
|
||||
return 0
|
||||
}
|
||||
// For every available thread a bit is set in the mask.
|
||||
ncpu := int(popcnt(uint64(mask)))
|
||||
return ncpu
|
||||
return bits.OnesCount64(uint64(mask))
|
||||
}
|
||||
|
||||
32
vendor/github.com/containers/common/pkg/sysinfo/nummem_linux.go
generated
vendored
32
vendor/github.com/containers/common/pkg/sysinfo/nummem_linux.go
generated
vendored
@@ -1,32 +0,0 @@
|
||||
//go:build linux
|
||||
|
||||
package sysinfo
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// NUMANodeCount queries the system for the count of Memory Nodes available
|
||||
// for use to this process.
|
||||
func NUMANodeCount() int {
|
||||
// this is the correct flag name (not defined in the unix package)
|
||||
//nolint:revive
|
||||
MPOL_F_MEMS_ALLOWED := (1 << 2)
|
||||
var mask [1024 / 64]uintptr
|
||||
_, _, err := unix.RawSyscall6(unix.SYS_GET_MEMPOLICY, 0, uintptr(unsafe.Pointer(&mask[0])), uintptr(len(mask)*8), 0, uintptr(MPOL_F_MEMS_ALLOWED), 0)
|
||||
if err != 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// For every available thread a bit is set in the mask.
|
||||
nmem := 0
|
||||
for _, e := range mask {
|
||||
if e == 0 {
|
||||
continue
|
||||
}
|
||||
nmem += int(popcnt(uint64(e)))
|
||||
}
|
||||
return nmem
|
||||
}
|
||||
9
vendor/github.com/containers/common/pkg/sysinfo/nummem_unsupported.go
generated
vendored
9
vendor/github.com/containers/common/pkg/sysinfo/nummem_unsupported.go
generated
vendored
@@ -1,9 +0,0 @@
|
||||
//go:build (windows && ignore) || osx
|
||||
|
||||
package sysinfo
|
||||
|
||||
// NUMANodeCount queries the system for the count of Memory Nodes available
|
||||
// for use to this process. Returns 0 on non NUMAs systems.
|
||||
func NUMANodeCount() int {
|
||||
return 0
|
||||
}
|
||||
10
vendor/github.com/containers/common/pkg/sysinfo/sysinfo.go
generated
vendored
10
vendor/github.com/containers/common/pkg/sysinfo/sysinfo.go
generated
vendored
@@ -133,16 +133,6 @@ func isCpusetListAvailable(provided, available string) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Returns bit count of 1, used by NumCPU
|
||||
func popcnt(x uint64) (n byte) {
|
||||
x -= (x >> 1) & 0x5555555555555555
|
||||
x = (x>>2)&0x3333333333333333 + x&0x3333333333333333
|
||||
x += x >> 4
|
||||
x &= 0x0f0f0f0f0f0f0f0f
|
||||
x *= 0x0101010101010101
|
||||
return byte(x >> 56)
|
||||
}
|
||||
|
||||
// GetDefaultPidsLimit returns the default pids limit to run containers with
|
||||
func GetDefaultPidsLimit() int64 {
|
||||
sysInfo := New(true)
|
||||
|
||||
Reference in New Issue
Block a user