---
name: "cpupri_find"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cpupri_find"
---

# cpupri\_find(9)

find the best (lowest-pri) CPU in the system

## NAME

cpupri\_find - find the best (lowest-pri) CPU in the system

## SYNOPSIS

**int cpupri\_find(struct cpupri \*** *cp***, struct task\_struct \*** *p***, struct cpumask \*** *lowest\_mask***);**

## ARGUMENTS

*cp*

The cpupri context

*p*

The task

*lowest\_mask*

A mask to fill in with selected CPUs (or NULL)

## NOTE

This function returns the recommended CPUs as calculated during the current invocation. By the time the call returns, the CPUs may have in fact changed priorities any number of times. While not ideal, it is not an issue of correctness since the normal rebalancer logic will correct any discrepancies created by racing against the uncertainty of the current priority configuration.

## RETURN

(int)bool - CPUs were found

## COPYRIGHT
