函数逻辑报告 |
Source Code:mm\page-writeback.c |
Create Date:2022-07-27 15:34:09 |
Last Modify:2022-05-23 13:25:58 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:alance_dirty_pages() must be called by processes which are generating dirty* data
函数原型:static void balance_dirty_pages(struct bdi_writeback *wb, unsigned long pages_dirtied)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bdi_writeback * | wb | |
unsigned long | pages_dirtied |
1564 | struct dirty_throttle_control gdtc_stor = {GDTC_INIT(wb)} |
1565 | struct dirty_throttle_control mdtc_stor = {MDTC_INIT(wb, & gdtc_stor)} |
1567 | struct dirty_throttle_control * const mdtc = mdtc_valid( & mdtc_stor) ? & mdtc_stor : NULL |
1576 | bool dirty_exceeded = false |
1579 | bdi等于ur parent bdi |
1581 | start_time等于jiffies |
1583 | 循环 |
1586 | m_dirty等于0 |
1587 | m_thresh等于0 |
1588 | m_bg_thresh等于0 |
1603 | 如果此条件成立可能性小(为编译器优化)(strictlimit)则 |
1609 | 否则 |
1610 | dirty等于le_dirty + write + nfs |
1611 | thresh等于dirty threshold |
1615 | 如果mdtc则 |
1622 | mem_cgroup_wb_stats(wb, & filepages, & headroom, & le_dirty + write + nfs , & writeback) |
1624 | le_dirty + write + nfs 加等于writeback |
1629 | 如果此条件成立可能性小(为编译器优化)(strictlimit)则 |
1634 | 否则 |
1636 | m_thresh等于dirty threshold |
1653 | 如果dirty小于等于dirty_freerun_ceiling(thresh, bg_thresh)且非mdtc或m_dirty小于等于dirty_freerun_ceiling(m_thresh, m_bg_thresh)的值则 |
1659 | dirty_paused_when等于now |
1660 | nr_dirtied等于0 |
1663 | nr_dirtied_pause等于两数取小(intv, m_intv) |
1664 | 退出 |
1670 | mem_cgroup_flush_foreign(wb) |
1676 | 如果非strictlimit则wb_dirty_limits(gdtc) |
1679 | dirty_exceeded等于per-wb counterparts 大于wb_thresh且le_dirty + write + nfs 大于dirty threshold 或strictlimit的值 |
1685 | 如果mdtc则 |
1692 | 如果非strictlimit则wb_dirty_limits(mdtc) |
1703 | 如果dirty_exceeded且非dirty_exceeded则dirty_exceeded等于1 |
1717 | max_pause等于wb_max_pause(wb, per-wb counterparts ) |
1722 | 如果此条件成立可能性小(为编译器优化)(task_ratelimit == 0)则 |
1727 | period等于HZ乘pages_dirtied除task_ratelimit |
1729 | 如果dirty_paused_when则pause减等于now减dirty_paused_when |
1752 | dirty_paused_when等于now |
1753 | nr_dirtied等于0 |
1754 | 否则如果period则 |
1755 | dirty_paused_when加等于period |
1756 | nr_dirtied等于0 |
1757 | 否则如果nr_dirtied_pause小于等于pages_dirtied则nr_dirtied_pause加等于pages_dirtied |
1759 | 退出 |
1761 | 如果此条件成立可能性小(为编译器优化)(pause > max_pause)则 |
1767 | pause : |
1784 | dirty_paused_when等于now加pause |
1785 | nr_dirtied等于0 |
1792 | 如果task_ratelimit则退出 |
1808 | 如果fatal_signal_pending(当前进程)则退出 |
1812 | 如果非dirty_exceeded且dirty_exceeded则dirty_exceeded等于0 |
名称 | 描述 |
---|---|
balance_dirty_pages_ratelimited | alance_dirty_pages_ratelimited - balance dirty memory state*@mapping: address_space which was dirtied* Processes which are dirtying memory should call in here once for each page* which was newly dirtied. The function will periodically check the system's |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |