当前位置:首页>Linux>Linux任务调度探秘(续):截止时间调度器(DL)

Linux任务调度探秘(续):截止时间调度器(DL)

  • 2026-01-11 00:17:43
Linux任务调度探秘(续):截止时间调度器(DL)

截止时间调度(SCHED_DEADLINE,简称DL)是 Linux 内核的高精度实时调度机制,允许任务以 “每周期最多运行多久(runtime)” 的方式使用CPU,确保在deadline前获得可预测的执行资源,适用于音视频、工业控制等时序敏感场景。

在深入介绍DL调度器的细节之前,我们先介绍一下相关的参数和一些基本数据结构。

相关参数和数据结构

在使用DL调度策略时,需要指定三个关键参数:

    • • 周期(dl_period):任务的激活间隔,即每隔多长时间启动一次新的执行实例;
    • • 运行时间(dl_runtime):在每个周期内,任务最多可使用的 CPU 时间;
    • • 截止时间(dl_deadline):从周期开始起,任务必须在此时间内完成其工作。

    这三个参数共同定义了任务的实时行为和资源需求,是DL实现确定性调度的基础,写代码时可以通过 sched_setattr() 指定这三个参数,参数值最终会被存放到sched_dl_entity调度实体中,Linux内核执行调度时依据调度实体的取值来做决策。

    我们通过配置关键参数来启动一个具体的DL任务:

    // 用户空间兼容定义(若未包含 linux/sched/types.h)structsched_attr {unsignedint size;unsignedint sched_policy;unsignedlonglong sched_flags;int sched_nice;unsignedint sched_priority;unsignedlonglong sched_runtime;unsignedlonglong sched_deadline;unsignedlonglong sched_period;};int main() {structsched_attrattr = {        .size          = sizeof(struct sched_attr),        .sched_policy  = SCHED_DEADLINE,     //指定使用 deadline 调度策略        .sched_runtime = 2000000ULL,   // 2 ms         .sched_deadline= 8000000ULL,  // 8 ms        .sched_period  = 10000000ULL// 10 ms    };if (syscall(__NR_sched_setattr, 0, &attr, 0) == -1) {        perror("sched_setattr");return1;    }// ... 执行实时工作负载 ...}
    • • sched_runtime = 2 ms
    • • sched_deadline = 8 ms
    • • sched_period = 10 ms。

    那么这个任务的运行情况应该是:每10ms构成一个调度周期,周期开始时获得2ms的 CPU 预算,必须在8ms截止期限前完成工作;若提前完成,剩余时间立即释放;若用尽 2ms 仍未完成,则被节流,暂停执行,直到下一周期恢复预算并继续运行。

    在NanoCode中执行下面的命令就可以列出就绪队列上的各个任务:

    !ndx.ready 6 -f 1

    结果如下:

    当前正在运行一个 DL 测试任务

    其调度实体sched_dl_entity的地址为0xffff00010df551c8。可通过 dt 命令进一步查看该实例的字段内容:

    dt lk!sched_dl_entity 0xffff00010df551c8

    显示如下:

    这是16进制的数据,换算成十进制并转换单位:

    • • dl_runtime = 0x1e8480 ns=2ms
    • • dl_deadline = 0x7a1200 ns= 8ms
    • • dl_period = 0x989680 ns=10 ms

    从结果可以看出,通过sched_setattr() 设置的参数已成功写入任务的调度实体sched_dl_entity中。

    再看运行时状态中的两个关键字段:

    • • runtime = 763721 ns ≈ 0.76 ms:这是当前周期中剩余的运行时间,表示该任务还能继续使用 CPU 约 0.76 毫秒。
    • • deadline = 0x2f06777fd1≈199 秒(自系统启动起):这是一个绝对时间戳,代表当前调度周期的截止时刻。

    我用一张图表示它们的关系:

    接下来,我们将以调度类为切入点,分析SCHED_DEADLINE调度器如何利用这些参数进行实时调度决策。

    DL调度类

    调度类中注册了一系列回调函数,用于在调度过程中操作调度实体,它在内核中的定义如下(简化版):

    DEFINE_SCHED_CLASS(dl) = {    .enqueue_task       = enqueue_task_dl,      // 任务入队(加入 deadline 队列)    .dequeue_task       = dequeue_task_dl,      // 任务出队    .pick_next_task     = pick_next_task_dl,    // 选择 deadline 最早的任务运行(EDF 核心)    .put_prev_task      = put_prev_task_dl,     // 切出当前任务    .task_tick          = task_tick_dl,         // 时钟滴答:更新执行时间、检查 runtime 是否耗尽    .update_curr        = update_curr_dl,       // 累加当前任务已用 CPU 时间(用于限流)    .task_fork          = task_fork_dl,         // 子任务初始化 deadline 和预算#ifdef CONFIG_SMP    .select_task_rq     = select_task_rq_dl,    // 为任务选择目标 CPU(通常绑定)#endif};

    我们追踪调度类中函数,分析DL调度器如何利用这些参数进行实时调度决策:

    • • 通过 入队函数(enqueue_task_dl),队列中如何组织调度实体。
    • • 通过 选择下一任务函数(pick_next_task_dl),揭示调度器如何基于EDF策略选取下一个运行的任务。
    • • 通过更新当前任务函数(update_curr_dl)与时钟滴答函数(task_tick_dl),剖析运行时间(runtime)的计费机制、周期重置逻辑以及限流的实现原理。

    调度实体的组织方式

    通过入队函数(enqueue_task_dl),我们可以了解调度实体在运行队列中的组织方式。为探究其调用过程,我们在 NanCode 上设置断点:

    bp lk!enqueue_task_dl

    断点命中后,查看调用栈如下:

    kkFrame Base        Return Address    Call Siteffff8000`0aceba28 ffff8000`080b6620 lk!enqueue_task_dl [kernel/sched/deadline.c @ 1673]ffff8000`0aceba60 ffff8000`080b7d38 lk!enqueue_task+0x11c [kernel/sched/core.c @ 2066]ffff8000`0aceba80 ffff8000`080b8220 lk!activate_task+0x34 [kernel/sched/core.c @ 2094]ffff8000`0acebab0 ffff8000`080b9aa4 lk!ttwu_do_activate+0xb8 [kernel/sched/core.c @ 3705]ffff8000`0acebb30 ffff8000`080b9be8 lk!try_to_wake_up+0x2ac [kernel/sched/core.c @ 3910]ffff8000`0acebb40 ffff8000`080a685c lk!wake_up_process+0x20 [kernel/sched/core.c @ 4367]

    从调用栈可见:当通过 wake_up_process() 唤醒一个DL任务时,内核最终会调用入队函数将其调度实体加入对应的运行队列。

    接下来,我们进入该入队函数,进一步分析 DL 调度实体的具体组织结构。

    入队函数相关调用:

    enqueue_task_dl └─ enqueue_dl_entity     ├─ update_dl_entity                   │ └─ replenish_dl_new_period     // 重置 runtime 和 deadline(基于当前时间初始化新周期)     └─ __enqueue_dl_entity                       └─ rb_add_cached                // 按 deadline 顺序插入,用于 EDF 调度

    刚创建的任务在首次入队时,会调用 replenish_dl_new_period() 初始化其调度参数:

    staticinlinevoidreplenish_dl_new_period(struct sched_dl_entity *dl_se,struct rq *rq){/* deadline = 当前系统时间 + 用户指定的相对截止期(dl_deadline) */    dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;/* runtime = 用户配置的运行预算(dl_runtime) */    dl_se->runtime = pi_of(dl_se)->dl_runtime;}
    • • 绝对截止时间deadline = now + dl_deadline
    • • CPU 预算runtime = dl_runtime

    然后调用rb_add_cached,将调度实体加入红黑树,它的具体实现如下:

    static __always_inline struct rb_node *rb_add_cached(struct rb_node *node, struct rb_root_cached *tree,bool (*less)(struct rb_node *, conststruct rb_node *)){structrb_node **link = &tree->rb_root.rb_node;structrb_node *parent =NULL;bool leftmost = true;  // 标记新节点是否将成为最左(最小)节点while (*link) {        parent = *link;if (less(node, parent)) {            link = &parent->rb_left;   // 插入左子树        } else {            link = &parent->rb_right;  // 插入右子树            leftmost = false;          // 不是最左节点        }    }    rb_link_node(node, parent, link);           // 将节点链接到树中    rb_insert_color_cached(node, tree, leftmost); // 重新着色并更新缓存(如最左节点)return leftmost ? node : NULL;  // 若为最左节点,返回 node;否则返回 NULL}

    简单来说,该函数根据 less 比较函数将调度实体插入到带缓存的红黑树中,并维护rb_leftmost 缓存:若新插入的节点成为整棵树的最小(最左)节点,则返回该节点;否则返回 NULL。

    而 less 比较函数正是基于 deadline 字段进行比较的:

    现在我们清楚了:DL调度器将任务按照deadline作为排序依据,组织在带缓存的红黑树中。

    趁热打铁,知道怎么存后,我们再看怎么取,聚焦pick_next_task_dl(选择下一个任务的函数)。

    pick_next_task_dl └─ pick_task_dl     └─ pick_next_dl_entity

    最终调用pick_next_dl_entity()选择实体,具体实现十分简洁:

    #define rb_first_cached(root) (root)->rb_leftmoststaticstruct sched_dl_entity *pick_next_dl_entity(struct dl_rq *dl_rq){structrb_node *left = rb_first_cached(&dl_rq->root);if (!left)returnNULL;return __node_2_dle(left);}

    通过直接获取该最左节点,高效选出下一个应运行的任务,正体现了最早截止时间优先(EDF) 调度策略的核心思想。

    值得注意的是,在获取调度实体后,内核直接使用container_of进行反推得到task_struct:

    staticinlinestruct task_struct *dl_task_of(struct sched_dl_entity *dl_se){return container_of(dl_se, struct task_struct, dl);}

    这也意味着DL不支持组调度,否则此处需额外判断实体归属(例如是否属于任务组)。

    现在我们已知调度实体按deadline组织在红黑树中,任务选择时总是取出deadline最早的实体;那么选中的任务在执行过程中,其runtime是如何更新的?限流机制(如每 10ms 重置预算)又是如何实现的?带着这些问题,我们再进入调度类中的相关更新函数一探究竟。

    runtime更新和限流机制

    调度类中的 update_curr_dl 函数负责更新当前任务的运行时统计信息,并在runtime预算耗尽时触发限流(throttling)。该函数主要在两个路径中被调用:

    • • 在 task_tick_dl 中调用:task_tick_dl 是调度器的周期性回调,由内核时钟中断定期触发,因此 update_curr_dl 会按固定时间粒度(通常为 tick 或高精度定时器)更新 runtime 消耗,实现基于时钟周期的精确计费。
    • • 在出队操作中调用:当任务被切换或主动让出 CPU 时(如在 dequeue_task_dl 路径中),也会调用 update_curr_dl,以确保最后一次执行片段的时间被准确计入预算。

    接下来,我们聚焦于runtime更新的核心逻辑,其实现如下:

    staticvoidupdate_curr_dl(struct rq *rq){structtask_struct *curr = rq->curr;structsched_dl_entity *dl_se = &curr->dl;    u64 delta_exec, scaled_delta_exec;    u64 now;if (!dl_task(curr) || !on_dl_rq(dl_se))return;    now = rq_clock_task(rq);    delta_exec = now - curr->se.exec_start;if (unlikely((s64)delta_exec <= 0)) {if (unlikely(dl_se->dl_yielded))goto throttle;return;    }    update_current_exec_runtime(curr, now, delta_exec); // 更新 se.sum_exec_runtime/* 计算考虑 CPU 频率和算力缩放后的执行时间 */unsignedlong scale_freq = arch_scale_freq_capacity(cpu_of(rq));unsignedlong scale_cpu = arch_scale_cpu_capacity(cpu_of(rq));    scaled_delta_exec = cap_scale(delta_exec, scale_freq);    scaled_delta_exec = cap_scale(scaled_delta_exec, scale_cpu);/* 扣减 runtime 预算 */    dl_se->runtime -= scaled_delta_exec;}

    关键步骤解析:

    1、计算实际执行时间:

    now = rq_clock_task(rq);delta_exec = now - curr->se.exec_start;

    使用“任务可见时钟”(排除中断等不可调度时间)计算自上次调度以来的执行时长 delta_exec。

    但还需考虑 CPU 频率与算力的差异。例如,在大小核架构中,大核和小核即使执行相同的时间,实际完成的工作量也不同。为此,内核会根据当前 CPU 的频率和算力对执行时间进行加权缩放,确保runtime消耗的计量在不同性能核心上保持公平性。

    2、按CPU算力缩放执行时间

    scaled_delta_exec = cap_scale(delta_exec, scale_freq);scaled_delta_exec = cap_scale(scaled_delta_exec, scale_cpu);

    3、将该值从任务当前周期的剩余运行预算中扣除:

    dl_se->runtime -= scaled_delta_exec;

    说到这里,runtime 的更新流程完成。

    那么,当 runtime 耗尽时,内核如何阻止任务继续执行?又如何确保其在下一个周期开始时重新获得运行机会?

    那么,当 runtime 耗尽时,内核如何阻止任务继续执行?又如何确保其在下一个周期开始时重新获得运行机会?我们接着看 update_curr_dl中限流的部分,具体实现如下:

    throttle:/* 检查是否耗尽 runtime 或主动让出 */if (dl_runtime_exceeded(dl_se) || dl_se->dl_yielded) {        dl_se->dl_throttled = 1;  // 标记为被限流if (dl_runtime_exceeded(dl_se) &&            (dl_se->flags & SCHED_FLAG_DL_OVERRUN))            dl_se->dl_overrun = 1;  // 记录 overrun        __dequeue_task_dl(rq, curr, 0);  // 从运行队列移除/* 尝试启动 replenishment 定时器(周期重置) */if (unlikely(is_dl_boosted(dl_se) || !start_dl_timer(curr)))            enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH);if (!is_leftmost(curr, &rq->dl))            resched_curr(rq);  // 触发重新调度    }

    步骤解析:

    当任务的 runtime 耗尽时,内核会将其标记为限流状态(dl_se->dl_throttled = 1),并从运行队列中移除,使其暂时不再参与调度。

    为了确保任务在下一个调度周期开始时能重新获得CPU预算并恢复执行,内核需要设置一个“闹钟”来准时唤醒它。这个“闹钟”正是通过启动一个高精度定时器(hrtimer)来实现的。

    关键代码行:

    if (unlikely(is_dl_boosted(dl_se) || !start_dl_timer(curr)))

    start_dl_timer()启动了这个定时器,这个定时器就会在下个周期开始时,触发回调函数dl_task_timer()用于恢复 runtime 并推进deadline

    dl_task_timer() 中恢复 runtime 和推进 deadline 的操作由 replenish_dl_entity()实现。

    具体代码如下(简化版):

    staticvoidreplenish_dl_entity(struct sched_dl_entity *dl_se){structrq *rq = rq_of_dl_rq(dl_rq_of_se(dl_se));/* 若 dl_deadline 未初始化(如 PI-boosted 非 DL 任务),按新周期初始化 */if (dl_se->dl_deadline == 0) {        replenish_dl_new_period(dl_se, rq);return;    }/* 主动让出 CPU 时清空剩余预算,确保节流生效 */if (dl_se->dl_yielded && dl_se->runtime > 0)        dl_se->runtime = 0;/* 循环推进周期,直到获得正的 runtime(可处理跨多个周期的 throttling) */while (dl_se->runtime <= 0) {        dl_se->deadline += pi_of(dl_se)->dl_period;        dl_se->runtime  += pi_of(dl_se)->dl_runtime;    }/* 若计算出的 deadline 仍早于当前时间(严重滞后),则以当前时间为起点重置 */if (dl_time_before(dl_se->deadline, rq_clock(rq)))        replenish_dl_new_period(dl_se, rq);/* 清除节流与让出标志,允许任务重新入队 */    dl_se->dl_yielded = 0;    dl_se->dl_throttled = 0;}

    关键行:

    /* 循环推进周期,直到获得正的 runtime(可处理跨多个周期的 throttling) */while (dl_se->runtime <= 0) {        dl_se->deadline += pi_of(dl_se)->dl_period;        dl_se->runtime  += pi_of(dl_se)->dl_runtime;    }

    这是恢复runtime和推进deadline的关键逻辑:在一般情况下(runtime 为 0),循环执行一次即可完成 replenish。使用循环而非 if,是为了正确处理因调度延迟等导致的 runtime 超支(包括负值或跨多个周期的严重超支)。

    现在我们清楚了,在DL调度中,runtime 的扣减由调度时钟触发,并考虑CPU算力的影响;而周期性的replenish机制则由高精度定时器驱动,用于按时更新deadline和恢复runtime。

    小结

    行文至此,《Linux 任务调度探秘》系列完结。从整体框架到各类调度策略,从单任务到组调度,从完全公平到实时调度,从2025到2026……我们一路深入 Linux 内核调度这个神秘堡垒。初读调度代码时以为只是“选个任务跑”,细探后才发现:公平性、实时性、负载均衡、能效调度……处处是权衡。愈是深入,愈感敬畏——学然后知不足,知不足而后进。请关注我们,新一年里,我们将开启更多的探秘之旅!

    (写文章很辛苦,恳请各位读者点击“在看”,也欢迎转发)
    *************************************************

    正心诚意,格物致知,以人文情怀审视软件,以软件技术改变人生

    扫描下方二维码或者在微信中搜索“盛格塾”小程序,可以阅读更多文章和有声读物

    也欢迎关注格友公众号

    最新文章

    随机文章

    基本 文件 流程 错误 SQL 调试
    1. 请求信息 : 2026-02-09 02:25:38 HTTP/2.0 GET : https://f.mffb.com.cn/a/460745.html
    2. 运行时间 : 0.575734s [ 吞吐率:1.74req/s ] 内存消耗:4,926.64kb 文件加载:140
    3. 缓存信息 : 0 reads,0 writes
    4. 会话信息 : SESSION_ID=731e305bef6e30b6138e7859d723448d
    1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
    2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
    3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
    4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
    5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
    6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
    7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
    8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
    9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
    10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
    11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
    12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
    13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
    14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
    15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
    16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
    17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
    18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
    19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
    20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
    21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
    22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
    23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
    24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
    25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
    26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
    27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
    28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
    29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
    30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
    31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
    32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
    33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
    34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
    35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
    36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
    37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
    38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
    39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
    40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
    41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
    42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
    43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
    44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
    45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
    46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
    47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
    48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
    49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
    50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
    51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
    52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
    53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
    54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
    55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
    56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
    57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
    58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
    59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
    60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
    61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
    62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
    63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
    64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
    65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
    66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
    67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
    68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
    69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
    70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
    71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
    72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
    73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
    74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
    75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
    76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
    77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
    78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
    79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
    80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
    81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
    82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
    83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
    84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
    85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
    86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
    87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
    88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
    89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
    90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
    91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
    92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
    93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
    94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
    95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
    96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
    97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
    98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
    99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
    100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
    101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
    102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
    103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
    104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
    105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
    106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
    107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
    108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
    109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
    110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
    111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
    112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
    113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
    114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
    115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
    116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
    117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
    118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
    119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
    120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
    121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
    122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
    123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
    124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
    125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
    126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
    127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
    128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
    129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
    130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
    131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
    132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
    133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
    134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
    135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
    136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
    137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
    138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
    139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
    140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
    1. CONNECT:[ UseTime:0.000937s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
    2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001380s ]
    3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.008319s ]
    4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.005051s ]
    5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001394s ]
    6. SELECT * FROM `set` [ RunTime:0.001583s ]
    7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001480s ]
    8. SELECT * FROM `article` WHERE `id` = 460745 LIMIT 1 [ RunTime:0.011742s ]
    9. UPDATE `article` SET `lasttime` = 1770575139 WHERE `id` = 460745 [ RunTime:0.007465s ]
    10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.002539s ]
    11. SELECT * FROM `article` WHERE `id` < 460745 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.006103s ]
    12. SELECT * FROM `article` WHERE `id` > 460745 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.010473s ]
    13. SELECT * FROM `article` WHERE `id` < 460745 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.026876s ]
    14. SELECT * FROM `article` WHERE `id` < 460745 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.147028s ]
    15. SELECT * FROM `article` WHERE `id` < 460745 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.176009s ]
    0.577364s