Function report |
Source Code:mm\mempolicy.c |
Create Date:2022-07-28 15:33:32 |
| Last Modify:2020-03-17 22:28:11 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Replace a policy range.
Proto:static int shared_policy_replace(struct shared_policy *sp, unsigned long start, unsigned long end, struct sp_node *new)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct shared_policy * | sp | |
| unsigned long | start | |
| unsigned long | end | |
| struct sp_node * | new |
| 2530 | ret = 0 |
| 2532 | restart : |
| 2533 | write_lock( & lock) |
| 2534 | n = lookup first element intersecting start-end. Caller holds sp->lock for* reading or for writing |
| 2543 | Else |
| 2550 | atomic_set( & refcnt, 1) |
| 2551 | sp_node_init(n_new, end, end, mpol_new) |
| 2554 | n_new = NULL |
| 2555 | mpol_new = NULL |
| 2556 | Break |
| 2560 | If Not next Then Break |
| 2566 | write_unlock( & lock) |
| 2567 | ret = 0 |
| 2569 | err_out : |
| 2572 | If n_new Then kmem_cache_free(sn_cache, n_new) |
| 2575 | Return ret |
| 2577 | alloc_new : |
| 2578 | write_unlock( & lock) |
| 2580 | n_new = kmem_cache_alloc(sn_cache, GFP_KERNEL) |
| 2583 | mpol_new = kmem_cache_alloc(policy_cache, GFP_KERNEL) |
| 2586 | Go to restart |
| Name | Describe |
|---|---|
| mpol_set_shared_policy |
| 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 |