Repository: kubernetes
Issue: kubelet fails to restart with CPUManager policy static when node's some CPU is offline
Labels: kind/bug,sig/node,kind/feature,priority/important-longterm,triage/accepted

### What happened?

I have a node with Configuration:
a. 96 CPUS with one CPU(ID=95) disabled. 
b. kubelet CPUManager static policy enabled.
c. kubeReserved: cpu: 2, systemReserved: cpu: 2

After start kubelet, the topology kubelet detected shows
`"Detected CPU topoloogy" topology=&{NumCPUs:95 NumCores:48 NumSockets:2 NumNUMANodes:2 CPUDetails:......`
Notes Core 25 contains CPU 25,73。 Core 47 contains CPU 47,95，but 95 is disabled and not shown in the log.

The static Policy process CPU reservation log below. 
`"takeFullCores: clainming core" core=47`
`"takeFullCores: clainming core" core=24`
`"takeRemainingCPUs: claiming CPU" cpu=25`
`"Reserved CPUs not available for exclusive assignment" reservedSize=4 reserved="24-25,47,72"`
`"Updated default CPUSet" cpuSet="0-94"`

The weird thing is when the first Pod admits, the reserved CPU(ID=25) is reused. 
`"Topology Affinity" pod="xxx" containerName="xxx" affinity={NUMANodeAffinity:<nil> Prefered:false}`
`"AllocateCPUs" numCPUs=20 socket=<nil>`
`"takeFullCores: clainming core" core=25`
`"takeRemainingCPUs: claiming CPU" cpu=26`
`"takeRemainingCPUs: claiming CPU" cpu=74`
....
`"Updated default CPUSet" cpuSet="0-24,35-72,83-94"`
`"AllocateCPUs" result="25-34,73-82"`

The confliction would further cause kubelet restart failure because of the static policy validation
`"Static policy invalid state, please drain node and remove policy state file" err="not all reserved cpus: \"24-25,47,72\" are present in defaultCpuSet: \"0-24,35-72,83-94\""`

### What did you expect to happen?

Pod Cpuset Allocation should not share with Reserved CPUs

### How can we reproduce it (as minimally and precisely as possible)?

1. use `chcpu -d` to disable one CPU in the node. Check `/sys/devices/system/cpu/online` file to make sure it works.
2. change kubelet configuration
   a. cpuManagerPolicy: static
   b. kubeReserved: cpu: 2, systemReserved: cpu: 2
3. restart kubelet
4. create a guaranteed Pod with some CPU
5. restart kubelet, expects it would fail to startup

### Anything else we need to know?

it seems that kubelet CPUManager static Policy have not taken CPU offline senario into account. 
1. in the specific case above, this method would result in 1(95/48), not 2
https://github.com/kubernetes/kubernetes/blob/227c2e7c2b2c05a9c8b2885460e28e4da25cf558/pkg/kubelet/cm/cpumanager/topology/topology.go#L49-L54
2. thus result in a Used Core as free (1==1)
https://github.com/kubernetes/kubernetes/blob/227c2e7c2b2c05a9c8b2885460e28e4da25cf558/pkg/kubelet/cm/cpumanager/cpu_assignment.go#L259-L262
3. all logic releated with CPUsPerCore, CPUsPerSocket is affected

### Kubernetes version

<details>
tested in kubernetes: v1.25, other version is the same.
</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>