• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/osfmk/kern/

Lines Matching refs:requested

59  *  Threads and tasks have three policy fields: requested, effective, and pending.
64 * Each interface that has an input into the task policy state machine controls a field in requested.
65 * If the interface has a getter, it returns what is in the field in requested, but that is
75 * 2) Change requested field for the relevant policy
76 * 3) Run a task policy update, which recalculates effective based on requested,
77 * then takes a diff between the old and new versions of requested and calls the relevant
83 * To add a new requested policy, add the field in the requested struct, the flavor in task.h,
93 * These are a set of behaviors that can be requested for a task. They currently have specific
536 info->requested = 0;
543 info->requested = task_requested_bitfield(task, THREAD_NULL);
664 * Gather requested policy
667 struct task_requested_policy requested =
672 * Calculate new effective policies from requested policy and task state
677 * Don't change requested, it won't take effect
688 * If DARWIN_BG has been requested at either level, it's engaged.
691 if (requested.int_darwinbg || requested.ext_darwinbg)
696 if (requested.t_apptype == TASK_APPTYPE_APP_TAL &&
697 requested.t_role == TASK_BACKGROUND_APPLICATION &&
698 requested.t_tal_enabled == 1) {
704 if (requested.t_apptype == TASK_APPTYPE_DAEMON_ADAPTIVE &&
705 requested.t_boosted == 0)
709 if (requested.t_apptype == TASK_APPTYPE_DAEMON_BACKGROUND)
712 if (requested.th_pidbind_bg)
715 if (requested.th_workq_bg)
741 if (on_task && requested.t_sup_lowpri_cpu && requested.t_boosted == 0)
750 next.bg_iotier = requested.bg_iotier;
755 iopol = MAX(iopol, requested.bg_iotier);
758 if (requested.t_apptype == TASK_APPTYPE_DAEMON_STANDARD)
761 if (requested.t_sup_disk && requested.t_boosted == 0)
768 iopol = MAX(iopol, requested.int_iotier);
769 iopol = MAX(iopol, requested.ext_iotier);
775 if (requested.ext_iopassive || requested.int_iopassive)
782 next.t_role = requested.t_role;
785 if (requested.t_sup_active && requested.t_boosted == 0)
789 if (requested.t_sup_suspend && requested.t_boosted == 0)
793 if (requested.t_int_gpu_deny || requested.t_ext_gpu_deny)
798 int latency_qos = requested.t_base_latency_qos;
800 if (requested.t_sup_timer && requested.t_boosted == 0)
801 latency_qos = requested.t_sup_timer;
803 if (requested.t_over_latency_qos != 0)
804 latency_qos = requested.t_over_latency_qos;
807 if (requested.t_role == TASK_GRAPHICS_SERVER)
813 int through_qos = requested.t_base_through_qos;
815 if (requested.t_sup_throughput && requested.t_boosted == 0)
816 through_qos = requested.t_sup_throughput;
818 if (requested.t_over_through_qos != 0)
819 through_qos = requested.t_over_through_qos;
824 if (requested.t_sup_cpu && requested.t_boosted == 0)
828 if (requested.terminated) {
1124 * Everything that modifies requested except functions that need to hold the task lock
1202 * Set the requested state for a specific flavor to a specific value.
1218 struct task_requested_policy requested =
1227 requested.ext_darwinbg = value;
1229 requested.int_darwinbg = value;
1235 requested.ext_iotier = tier;
1236 requested.ext_iopassive = passive;
1238 requested.int_iotier = tier;
1239 requested.int_iopassive = passive;
1245 requested.ext_iotier = value;
1247 requested.int_iotier = value;
1252 requested.ext_iopassive = value;
1254 requested.int_iopassive = value;
1262 requested.t_ext_gpu_deny = value;
1264 requested.t_int_gpu_deny = value;
1270 requested.ext_darwinbg = value;
1271 requested.t_ext_gpu_deny = value;
1273 requested.int_darwinbg = value;
1274 requested.t_int_gpu_deny = value;
1283 requested.bg_iotier = tier;
1290 requested.t_tal_enabled = value;
1295 requested.t_boosted = value;
1300 requested.t_role = value;
1305 requested.terminated = value;
1312 requested.th_pidbind_bg = value;
1317 requested.th_workq_bg = value;
1326 task->requested_policy = requested;
1328 thread->requested_policy = requested;
1347 struct task_requested_policy requested =
1353 value = requested.ext_darwinbg;
1355 value = requested.int_darwinbg;
1359 value = proc_tier_to_iopol(requested.ext_iotier,
1360 requested.ext_iopassive);
1362 value = proc_tier_to_iopol(requested.int_iotier,
1363 requested.int_iopassive);
1367 value = requested.ext_iotier;
1369 value = requested.int_iotier;
1373 value = requested.ext_iopassive;
1375 value = requested.int_iopassive;
1380 value = requested.t_ext_gpu_deny;
1382 value = requested.t_int_gpu_deny;
1386 value = proc_tier_to_iopol(requested.bg_iotier, 0);
1390 value = requested.t_role;
1808 info->requested = (integer_t)task_requested_bitfield(task, thread);
1815 /* dump requested for tracepoint */
1840 struct task_requested_policy requested =
1843 bits |= (requested.int_darwinbg ? POLICY_REQ_INT_DARWIN_BG : 0);
1844 bits |= (requested.ext_darwinbg ? POLICY_REQ_EXT_DARWIN_BG : 0);
1845 bits |= (requested.int_iotier ? (((uint64_t)requested.int_iotier) << POLICY_REQ_INT_IO_TIER_SHIFT) : 0);
1846 bits |= (requested.ext_iotier ? (((uint64_t)requested.ext_iotier) << POLICY_REQ_EXT_IO_TIER_SHIFT) : 0);
1847 bits |= (requested.int_iopassive ? POLICY_REQ_INT_PASSIVE_IO : 0);
1848 bits |= (requested.ext_iopassive ? POLICY_REQ_EXT_PASSIVE_IO : 0);
1849 bits |= (requested.bg_iotier ? (((uint64_t)requested.bg_iotier) << POLICY_REQ_BG_IOTIER_SHIFT) : 0);
1850 bits |= (requested.terminated ? POLICY_REQ_TERMINATED : 0);
1852 bits |= (requested.th_pidbind_bg ? POLICY_REQ_PIDBIND_BG : 0);
1853 bits |= (requested.th_workq_bg ? POLICY_REQ_WORKQ_BG : 0);
1855 bits |= (requested.t_boosted ? POLICY_REQ_BOOSTED : 0);
1856 bits |= (requested.t_tal_enabled ? POLICY_REQ_TAL_ENABLED : 0);
1857 bits |= (requested.t_int_gpu_deny ? POLICY_REQ_INT_GPU_DENY : 0);
1858 bits |= (requested.t_ext_gpu_deny ? POLICY_REQ_EXT_GPU_DENY : 0);
1859 bits |= (requested.t_apptype ? (((uint64_t)requested.t_apptype) << POLICY_REQ_APPTYPE_SHIFT) : 0);
1860 bits |= (requested.t_role ? (((uint64_t)requested.t_role) << POLICY_REQ_ROLE_SHIFT) : 0);
1862 bits |= (requested.t_sup_active ? POLICY_REQ_SUP_ACTIVE : 0);
1863 bits |= (requested.t_sup_lowpri_cpu ? POLICY_REQ_SUP_LOWPRI_CPU : 0);
1864 bits |= (requested.t_sup_cpu ? POLICY_REQ_SUP_CPU : 0);
1865 bits |= (requested.t_sup_timer ? (((uint64_t)requested.t_sup_timer) << POLICY_REQ_SUP_TIMER_THROTTLE_SHIFT) : 0);
1866 bits |= (requested.t_sup_throughput ? (((uint64_t)requested.t_sup_throughput) << POLICY_REQ_SUP_THROUGHPUT_SHIFT) : 0);
1867 bits |= (requested.t_sup_disk ? POLICY_REQ_SUP_DISK_THROTTLE : 0);
1868 bits |= (requested.t_sup_cpu_limit ? POLICY_REQ_SUP_CPU_LIMIT : 0);
1869 bits |= (requested.t_sup_suspend ? POLICY_REQ_SUP_SUSPEND : 0);
1870 bits |= (requested.t_base_latency_qos ? (((uint64_t)requested.t_base_latency_qos) << POLICY_REQ_BASE_LATENCY_QOS_SHIFT) : 0);
1871 bits |= (requested.t_over_latency_qos ? (((uint64_t)requested.t_over_latency_qos) << POLICY_REQ_OVER_LATENCY_QOS_SHIFT) : 0);
1872 bits |= (requested.t_base_through_qos ? (((uint64_t)requested.t_base_through_qos) << POLICY_REQ_BASE_THROUGH_QOS_SHIFT) : 0);
1873 bits |= (requested.t_over_through_qos ? (((uint64_t)requested.t_over_through_qos) << POLICY_REQ_OVER_THROUGH_QOS_SHIFT) : 0);
1993 * A deadline-based CPU limit is actually a simple wallclock timer - the requested action is performed
1996 * A percentage-based CPU limit performs the requested action after the specified amount of actual CPU time