函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:46:45 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:swap allocation tell device that a cluster of swap can now be discarded,* to allow the swap device to optimize its wear-levelling.
函数原型:static void discard_swap_cluster(struct swap_info_struct *si, unsigned long start_page, unsigned long nr_pages)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct swap_info_struct * | si | |
unsigned long | start_page | |
unsigned long | nr_pages |
231 | se等于offset_to_swap_extent(si, start_page) |
234 | offset等于start_page减start_page |
235 | start_block等于start_block加offset |
240 | start_page加等于nr_blocks |
243 | start_block左移等于PAGE_SHIFT determines the page size 减9位 |
244 | nr_blocks左移等于PAGE_SHIFT determines the page size 减9位 |
名称 | 描述 |
---|---|
swap_do_scheduled_discard | Doing discard actually. After a cluster discard is finished, the cluster* will be added to free cluster list. caller should hold si->lock. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |