| /linux/Documentation/translations/zh_CN/scheduler/ |
| H A D | sched-arch.rst | 37 2. need_resched/TIF_NEED_RESCHED 只会被设置,并且在运行任务调用 schedule() 38 之前永远不会被清除。空闲线程只需要查询need_resched,并且永远不会设置或清除它。 40 3. 当cpu_idle发现(need_resched() == 'true'),它应该调用schedule()。否则 43 4. 在检查need_resched时,唯一需要禁用中断的情况是,我们要让处理器休眠到下一个中 44 断(这并不对need_resched提供任何保护,它可以防止丢失一个中断): 49 if (!need_resched()) { 55 5. 当need_resched变为高电平时,TIF_POLLING_NRFLAG可以由不需要中断来唤醒它们 56 的空闲程序设置。换句话说,它们必须定期轮询need_resched,尽管做一些后台工作或 60 么需要清除它,然后发出一个内存屏障(接着测试need_resched,禁用中断,如3中解释)。
|
| /linux/Documentation/scheduler/ |
| H A D | sched-arch.rst | 29 2. need_resched/TIF_NEED_RESCHED is only ever set, and will never 31 threads need only ever query need_resched, and may never set or 34 3. When cpu_idle finds (need_resched() == 'true'), it should call 38 need_resched is if we are about to sleep the processor until 40 need_resched, it prevents losing an interrupt): 45 if (!need_resched()) { 52 need an interrupt to wake them up when need_resched goes high. 53 In other words, they must be periodically polling need_resched, 59 barrier issued (followed by a test of need_resched with
|
| /linux/arch/arm64/include/asm/ |
| H A D | preempt.h | 31 current_thread_info()->preempt.need_resched = 0; in set_preempt_need_resched() 36 current_thread_info()->preempt.need_resched = 1; in clear_preempt_need_resched() 41 return !current_thread_info()->preempt.need_resched; in test_preempt_need_resched()
|
| /linux/arch/mips/kernel/ |
| H A D | entry.S | 48 # interrupt setting need_resched 84 local_irq_disable # make sure need_resched and 128 local_irq_disable # make sure need_resched and 150 local_irq_disable # make sure need_resched doesn't
|
| H A D | idle.c | 47 if (!need_resched()) in r4k_wait_irqoff() 61 if (!need_resched()) in rm7k_wait_irqoff()
|
| /linux/Documentation/trace/rv/ |
| H A D | monitor_sched.rst | 181 ``need_resched``. Only kernel preemption is considered, since preemption 195 In theory, a preemption can only occur after the ``need_resched`` flag is set. In 199 need_resched 203 !need_resched 208 path, it schedules, which clears the ``need_resched`` flag. 253 Due to how the ``need_resched`` flag on the preemption count works on arm64, 283 if the ``need_resched`` flag is set. By definition, a task cannot yield while 348 operations like ``wakeup`` and ``need_resched`` occur with interrupts and 351 ``need_resched`` can be set by some RCU internals functions, in which case it 396 might invoke a softirq to set ``need_resched`` and wake up a task. This is
|
| /linux/arch/x86/include/asm/ |
| H A D | mwait.h | 111 if (need_resched()) in mwait_idle_with_hints() 122 if (need_resched()) in mwait_idle_with_hints()
|
| /linux/drivers/cpuidle/ |
| H A D | coupled.c | 477 if (need_resched()) { in cpuidle_enter_state_coupled() 519 if (need_resched()) { in cpuidle_enter_state_coupled() 535 if (need_resched()) { in cpuidle_enter_state_coupled()
|
| H A D | cpuidle-powernv.c | 82 while (!need_resched()) { in snooze_loop()
|
| /linux/kernel/trace/ |
| H A D | trace_output.c | 456 char need_resched; in trace_print_lat_fmt() local 477 need_resched = 'B'; in trace_print_lat_fmt() 480 need_resched = 'N'; in trace_print_lat_fmt() 483 need_resched = 'L'; in trace_print_lat_fmt() 486 need_resched = 'b'; in trace_print_lat_fmt() 489 need_resched = 'n'; in trace_print_lat_fmt() 492 need_resched = 'p'; in trace_print_lat_fmt() 495 need_resched = 'l'; in trace_print_lat_fmt() 498 need_resched = '.'; in trace_print_lat_fmt() 511 irqs_off, need_resched, hardsoft_irq); in trace_print_lat_fmt()
|
| /linux/fs/btrfs/ |
| H A D | extent-io-tree.c | 716 if (need_resched()) in btrfs_clear_extent_bit_changeset() 754 if (state && !need_resched()) in btrfs_clear_extent_bit_changeset() 1133 if (state && state->start == start && !need_resched()) in set_extent_bit() 1189 if (state && state->start == start && !need_resched()) in set_extent_bit() 1234 if (need_resched()) in set_extent_bit() 1392 if (state && state->start == start && !need_resched()) in btrfs_convert_extent_bit() 1431 if (state && state->start == start && !need_resched()) in btrfs_convert_extent_bit() 1477 if (need_resched()) in btrfs_convert_extent_bit()
|
| /linux/kernel/sched/ |
| H A D | idle.c | 183 if (need_resched()) { in cpuidle_idle_call() 280 while (!need_resched()) { in do_idle()
|
| /linux/drivers/net/ethernet/sfc/ |
| H A D | ef100_rep.c | 399 bool need_resched; in efx_ef100_rep_poll() local 424 need_resched = efv->write_index != read_index; in efx_ef100_rep_poll() 426 if (need_resched) in efx_ef100_rep_poll()
|
| /linux/fs/ |
| H A D | drop_caches.c | 32 (mapping_empty(inode->i_mapping) && !need_resched())) { in drop_pagecache_sb()
|
| /linux/drivers/acpi/ |
| H A D | acpi_pad.c | 168 while (!need_resched()) { in power_saving_thread() 213 if (unlikely(need_resched())) in power_saving_thread()
|
| /linux/Documentation/translations/zh_CN/locking/ |
| H A D | mutex-design.rst | 53 任务(need_resched,需要重新调度)准备运行时,当前任务试图自旋来获得
|
| /linux/drivers/gpib/agilent_82350b/ |
| H A D | agilent_82350b.c | 539 if (need_resched()) in init_82350a_hardware() 550 if (need_resched()) in init_82350a_hardware() 573 if (need_resched()) in test_sram() 584 if (need_resched()) in test_sram()
|
| /linux/drivers/net/wireguard/ |
| H A D | send.c | 282 if (need_resched()) in wg_packet_tx_worker() 306 if (need_resched()) in wg_packet_encrypt_worker()
|
| /linux/mm/ |
| H A D | dmapool_test.c | 85 if (need_resched()) in dmapool_test_block()
|
| /linux/drivers/char/ |
| H A D | mem.c | 73 if (need_resched()) in should_stop_iteration() 471 if (!need_resched()) in read_iter_zero()
|
| /linux/arch/arm/mach-omap2/ |
| H A D | cpuidle34xx.c | 114 if (omap_irq_pending() || need_resched()) in omap3_enter_idle()
|
| /linux/arch/um/kernel/ |
| H A D | process.c | 233 return need_resched(); in uml_need_resched()
|
| /linux/kernel/locking/ |
| H A D | rwsem.c | 710 if (need_resched()) { in rwsem_can_spin_on_owner() 780 if (need_resched() || !owner_on_cpu(owner)) { in rwsem_spin_on_owner() 912 if (need_resched()) in rwsem_optimistic_spin()
|
| /linux/kernel/ |
| H A D | softirq.c | 641 if (time_before(jiffies, end) && !need_resched() && in handle_softirqs() 688 if ((sched_core_idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) { in tick_irq_exit()
|
| /linux/security/keys/ |
| H A D | gc.c | 264 if (spin_is_contended(&key_serial_lock) || need_resched()) in key_garbage_collector()
|