函数逻辑报告 |
Source Code:mm\z3fold.c |
Create Date:2022-07-27 18:05:35 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:z3fold_reclaim_page() - evicts allocations from a pool page and frees it*@pool: pool from which a page will attempt to be evicted*@retries: number of pages on the LRU list for which eviction will* be attempted before failing* z3fold reclaim is different
函数原型:static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct z3fold_pool * | pool | |
unsigned int | retries |
1341 | ret等于负1 |
1342 | struct z3fold_header * zhdr = NULL |
1345 | first_handle等于0, middle_handle等于0, last_handle等于0 |
1347 | 加自旋锁 |
1353 | 如果链表为空则 |
1354 | 自旋锁解锁 |
1355 | 返回:负EINVAL |
1364 | page = NULL |
1365 | 继续下一循环 |
1368 | 如果此条件成立可能性小(为编译器优化)(PageIsolated(page))则 |
1370 | page = NULL |
1371 | 继续下一循环 |
1373 | zhdr等于page_address(page) |
1374 | 如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则退出 |
1377 | 如果非Try to lock a z3fold page 则 |
1379 | zhdr = NULL |
1380 | 继续下一循环 |
1382 | 如果foreign_handles则 |
1388 | 对象增加引用 |
1389 | 删除链表项并重新初始化 |
1390 | cpu等于负1 |
1391 | 退出 |
1397 | 删除链表项并重新初始化 |
1398 | 自旋锁解锁 |
1407 | first_handle等于0 |
1408 | last_handle等于0 |
1409 | middle_handle等于0 |
1410 | 如果first_chunks则first_handle等于encode_handle(zhdr, FIRST) |
1412 | 如果middle_chunks则middle_handle等于encode_handle(zhdr, MIDDLE) |
1414 | 如果last_chunks则last_handle等于encode_handle(zhdr, LAST) |
1420 | Unlock a z3fold page |
1421 | 否则 |
1422 | first_handle等于encode_handle(zhdr, HEADLESS) |
1423 | last_handle等于middle_handle等于0 |
1426 | 如果middle_handle则 |
1432 | 如果first_handle则 |
1438 | 如果last_handle则 |
1444 | next : |
1455 | 否则 |
1456 | Lock a z3fold page |
1459 | atomic64_dec( & pages_nr) |
1460 | 返回:0 |
1467 | 加自旋锁 |
1468 | 添加链表项 |
1469 | 自旋锁解锁 |
1470 | Unlock a z3fold page |
1475 | 加自旋锁 |
1477 | 自旋锁解锁 |
1478 | 返回:负EAGAIN |
名称 | 描述 |
---|---|
z3fold_zpool_shrink |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |