Function report |
Source Code:mm\hugetlb.c |
Create Date:2022-07-28 15:27:11 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:set_max_huge_pages
Proto:static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, nodemask_t *nodes_allowed)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct hstate * | h | |
unsigned long | count | |
int | nid | |
nodemask_t * | nodes_allowed |
2316 | If node_alloc_noretry Then nodes_clear( * node_alloc_noretry) |
2318 | Else Return -ENOMEM |
2321 | spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2329 | If nid != NUMA_NO_NODE Then |
2332 | count += nr_huge_pages - nr_huge_pages_node[nid] |
2351 | If count > persistent_huge_pages(h) Then |
2370 | When surplus_huge_pages && count > persistent_huge_pages(h) cycle |
2375 | When count > persistent_huge_pages(h) cycle |
2381 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2384 | cond_resched() |
2388 | spin_lock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2393 | If signal_pending(current process) Then Go to out |
2412 | min_count = resv_huge_pages + nr_huge_pages - free_huge_pages |
2413 | min_count = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(count, min_count) |
2414 | try_to_free_low(h, min_count, nodes_allowed) |
2415 | When min_count < persistent_huge_pages(h) cycle |
2420 | When count < persistent_huge_pages(h) cycle |
2424 | out : |
2425 | max_huge_pages = persistent_huge_pages(h) |
2426 | spin_unlock( & Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,* free_huge_pages, and surplus_huge_pages.) |
2430 | Return 0 |
Name | Describe |
---|---|
__nr_hugepages_store_common |
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 |