函数逻辑报告 |
Source Code:mm\percpu.c |
Create Date:2022-07-27 15:51:57 |
Last Modify:2022-05-23 13:52:24 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Balance work is used to populate or destroy chunks asynchronously. We* try to keep the number of populated free pages between* PCPU_EMPTY_POP_PAGES_LOW and HIGH for atomic allocations and at most one* empty chunk.
函数原型:static void pcpu_balance_workfn(struct work_struct *work)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct work_struct * | work |
1837 | free_head等于pcpu_slot[pcpu_nr_slots - 1] |
1845 | mutex_lock( & pcpu_alloc_mutex) |
1846 | spin_lock_irq( & pcpu_lock) |
1849 | WARN_ON( no [de]population allowed ) |
1855 | 链表项移动到头部 |
1858 | spin_unlock_irq( & pcpu_lock) |
1866 | spin_lock_irq( & pcpu_lock) |
1868 | spin_unlock_irq( & pcpu_lock) |
1870 | pcpu_destroy_chunk(chunk) |
1871 | cond_resched() |
1884 | retry_pop : |
1885 | 如果pcpu_atomic_alloc_failed则 |
1888 | pcpu_atomic_alloc_failed = false |
1889 | 否则 |
1895 | 以slot小于pcpu_nr_slots循环 |
1896 | nr_unpop等于0 |
1901 | spin_lock_irq( & pcpu_lock) |
1907 | spin_unlock_irq( & pcpu_lock) |
1909 | 如果非nr_unpop则继续下一循环 |
1918 | 如果非ret则 |
1920 | spin_lock_irq( & pcpu_lock) |
1922 | spin_unlock_irq( & pcpu_lock) |
1923 | 否则 |
1924 | nr_to_pop等于0 |
1932 | 如果nr_to_pop则 |
1934 | chunk等于pcpu_create_chunk(gfp) |
1935 | 如果chunk则 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |