Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for Preemptable (0.32 sec)

  1. pkg/kubelet/types/pod_update.go

    	if pod.Spec.Priority != nil && IsCriticalPodBasedOnPriority(*pod.Spec.Priority) {
    		return true
    	}
    	return false
    }
    
    // Preemptable returns true if preemptor pod can preempt preemptee pod
    // if preemptee is not critical or if preemptor's priority is greater than preemptee's priority
    func Preemptable(preemptor, preemptee *v1.Pod) bool {
    	if IsCriticalPod(preemptor) && !IsCriticalPod(preemptee) {
    		return true
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 07 22:26:12 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. pkg/kubelet/types/pod_update_test.go

    			preemptee: getTestPod(configSourceAnnotation(FileSource), &systemPriority, ""),
    			expected:  false,
    		},
    	}
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			isPreemtable := Preemptable(test.preemptor, test.preemptee)
    			assert.Equal(t, test.expected, isPreemtable)
    		})
    	}
    }
    
    func TestIsCriticalPodBasedOnPriority(t *testing.T) {
    	tests := []struct {
    		priority int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 21 08:20:50 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  3. pkg/kubelet/preemption/preemption.go

    // can be preempted by preemptor pod.
    func sortPodsByQOS(preemptor *v1.Pod, pods []*v1.Pod) (bestEffort, burstable, guaranteed []*v1.Pod) {
    	for _, pod := range pods {
    		if kubetypes.Preemptable(preemptor, pod) {
    			switch v1qos.GetPodQOS(pod) {
    			case v1.PodQOSBestEffort:
    				bestEffort = append(bestEffort, pod)
    			case v1.PodQOSBurstable:
    				burstable = append(burstable, pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 16:53:19 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  4. cluster/gce/gci/shutdown.sh

    # limitations under the License.
    
    # A script that let's gci preemptible nodes gracefully terminate in the event of a VM shutdown.
    preemptible=$(curl "http://metadata.google.internal/computeMetadata/v1/instance/scheduling/preemptible" -H "Metadata-Flavor: Google")
    if [ "${preemptible}" == "TRUE" ]; then
        echo "Shutting down! Sleeping for a minute to let the node gracefully terminate"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 03:46:45 UTC 2019
    - 1.1K bytes
    - Viewed (0)
  5. src/runtime/preempt.go

    //
    // This must be called from the system stack and the user goroutine on
    // the current M (if any) must be in a preemptible state. This
    // prevents deadlocks where two goroutines attempt to suspend each
    // other and both are in non-preemptible states. There are other ways
    // to resolve this deadlock, but this seems simplest.
    //
    // TODO(austin): What if we instead required this to be called from a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  6. src/runtime/mgcmark.go

    		// would be a performance hit.
    		// Instead we recheck it here on the non-preemptible system
    		// stack to determine if we should perform an assist.
    
    		// GC is done, so ignore any remaining debt.
    		gp.gcAssistBytes = 0
    		return
    	}
    	// Track time spent in this assist. Since we're on the
    	// system stack, this is non-preemptible, so we can
    	// just measure start and end time.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  7. src/runtime/unsafepoint_test.go

    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		t.Fatalf("can't objdump %v", err)
    	}
    	lines := strings.Split(string(out), "\n")[1:]
    
    	// Walk through assembly instructions, checking preemptible flags.
    	var entry uint64
    	var startedWB bool
    	var doneWB bool
    	instructionCount := 0
    	unsafeCount := 0
    	for _, line := range lines {
    		line = strings.TrimSpace(line)
    		t.Logf("%s", line)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 11 20:24:56 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. src/runtime/crash_unix_test.go

    	cmd.Dir = t.TempDir() // put any core file in tempdir
    	cmd.Env = append(cmd.Env,
    		"GOTRACEBACK=crash",
    		// Set GOGC=off. Because of golang.org/issue/10958, the tight
    		// loops in the test program are not preemptible. If GC kicks
    		// in, it may lock up and prevent main from saying it's ready.
    		"GOGC=off",
    		// Set GODEBUG=asyncpreemptoff=1. If a thread is preempted
    		// when it receives SIGQUIT, it won't show the expected
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 20:11:47 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  9. cluster/gce/config-test.sh

      NODE_LABELS="${NODE_LABELS},cloud.google.com/gke-preemptible=true"
      WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS},cloud.google.com/gke-preemptible=true"
    elif [[ "${PREEMPTIBLE_NODE}" = 'true' ]]; then
      NON_MASTER_NODE_LABELS="${NON_MASTER_NODE_LABELS},cloud.google.com/gke-preemptible=true"
      WINDOWS_NON_MASTER_NODE_LABELS="${WINDOWS_NON_MASTER_NODE_LABELS},cloud.google.com/gke-preemptible=true"
    fi
    
    # Optional: Enable netd.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 17:20:24 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  10. cluster/gce/config-default.sh

        NODE_LABELS="${NODE_LABELS},cloud.google.com/gke-preemptible=true"
        WINDOWS_NODE_LABELS="${WINDOWS_NODE_LABELS},cloud.google.com/gke-preemptible=true"
    elif [[ "${PREEMPTIBLE_NODE}" == "true" ]]; then
        NON_MASTER_NODE_LABELS="${NON_MASTER_NODE_LABELS},cloud.google.com/gke-preemptible=true"
        WINDOWS_NON_MASTER_NODE_LABELS="${WINDOWS_NON_MASTER_NODE_LABELS},cloud.google.com/gke-preemptible=true"
    fi
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 20:16:32 UTC 2024
    - 26.9K bytes
    - Viewed (0)
Back to top