Function report |
Source Code:mm\z3fold.c |
Create Date:2022-07-28 16:30:22 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 |
| 1349 | spin_unlock( & lock) |
| 1350 | Return -EINVAL |
| 1354 | spin_unlock( & lock) |
| 1355 | Return -EINVAL |
| 1364 | page = NULL |
| 1365 | Continue |
| 1370 | page = NULL |
| 1371 | Continue |
| 1373 | zhdr = page_address(page) |
| 1374 | If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Break |
| 1377 | If Not Try to lock a z3fold page Then |
| 1379 | zhdr = NULL |
| 1380 | Continue |
| 1382 | If foreign_handles Then |
| 1390 | cpu = -1 |
| 1391 | Break |
| 1394 | If Not zhdr Then Break |
| 1398 | spin_unlock( & lock) |
| 1407 | first_handle = 0 |
| 1408 | last_handle = 0 |
| 1409 | middle_handle = 0 |
| 1410 | If first_chunks Then first_handle = encode_handle(zhdr, FIRST) |
| 1412 | If middle_chunks Then middle_handle = encode_handle(zhdr, MIDDLE) |
| 1414 | If last_chunks Then last_handle = encode_handle(zhdr, LAST) |
| 1420 | Unlock a z3fold page |
| 1421 | Else |
| 1422 | first_handle = encode_handle(zhdr, HEADLESS) |
| 1423 | last_handle = middle_handle = 0 |
| 1426 | If middle_handle Then |
| 1432 | If first_handle Then |
| 1438 | If last_handle Then |
| 1444 | next : |
| 1446 | If ret == 0 Then |
| 1453 | spin_unlock( & lock) |
| 1455 | Else |
| 1456 | Lock a z3fold page |
| 1459 | atomic64_dec( & pages_nr) |
| 1460 | Return 0 |
| 1469 | spin_unlock( & lock) |
| 1470 | Unlock a z3fold page |
| 1477 | spin_unlock( & lock) |
| 1478 | Return -EAGAIN |
| Name | Describe |
|---|---|
| z3fold_zpool_shrink |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |