code: func (kl *Kubelet) cleanupOrphanedPodCgroups(cgroupPods map[types.UID]cm.CgroupName, activePods []*v1.Pod) {
  	// Add all running pods to the set that we want to preserve
  	podSet := sets.NewString()
  	for _, pod := range activePods {
  		podSet.Insert(string(pod.UID))
  	}
  	pcm := kl.containerManager.NewPodContainerManager()
  
  	// Iterate over all the found pods to verify if they should be running
  	for uid, val := range cgroupPods {
  		// if the pod is in the running set, its not a candidate for cleanup
  		if podSet.Has(string(uid)) {
  			continue
  		}
  
  		// If volumes have not been unmounted/detached, do not delete the cgroup
  		// so any memory backed volumes don't have their charges propagated to the
  		// parent croup.  If the volumes still exist, reduce the cpu shares for any
  		// process in the cgroup to the minimum value while we wait.  if the kubelet
  		// is configured to keep terminated volumes, we will delete the cgroup and not block.
  		if podVolumesExist := kl.podVolumesExist(uid); podVolumesExist && !kl.keepTerminatedPodVolumes {
  			klog.V(3).Infof("Orphaned pod %q found, but volumes not yet removed.  Reducing cpu to minimum", uid)
  			if err := pcm.ReduceCPULimits(val); err != nil {
  				klog.Warningf("Failed to reduce cpu time for pod %q pending volume cleanup due to %v", uid, err)
  			}
  			continue
  		}
  		klog.V(3).Infof("Orphaned pod %q found, removing pod cgroups", uid)
  		// Destroy all cgroups of pod that should not be running,
  		// by first killing all the attached processes to these cgroups.
  		// We ignore errors thrown by the method, as the housekeeping loop would
  		// again try to delete these unwanted pod cgroups
  		go pcm.Destroy(val)
  	}
  }
docs: // cleanupOrphanedPodCgroups removes cgroups that should no longer exist.
  // it reconciles the cached state of cgroupPods with the specified list of runningPods