Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:04:46 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Spill all the per-cpu pages from all CPUs back into the buddy allocator.* When zone parameter is non-NULL, spill just the single zone's pages.* Note that this can be extremely slow as the draining happens in a workqueue.
Proto:void drain_all_pages(struct zone *zone)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct zone * | zone |
2894 | If WARN_ON_ONCE(!mm_percpu_wq) Then Return |
2903 | If Not zone Then Return |
2905 | mutex_lock( & pcpu_drain_mutex) |
2914 | for_each_online_cpu(cpu) |
2917 | bool has_pcps = false |
2919 | If zone Then |
2920 | pcp = per_cpu_ptr(pageset, cpu) |
2921 | If number of pages in the list Then has_pcps = true |
2923 | Else |
2924 | do nothing (z) |
2925 | pcp = per_cpu_ptr(pageset, cpu) |
2926 | If number of pages in the list Then |
2927 | has_pcps = true |
2928 | Break |
2933 | If has_pcps Then pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer |
2940 | drain = per_cpu_ptr( & pcpu_drain, cpu) |
2943 | INIT_WORK( & work, drain_local_pages_wq) |
2946 | for_each_cpu(cpu, & cpus_with_pcps) |
Name | Describe |
---|---|
__alloc_pages_direct_reclaim | The really slow allocator path where we enter direct reclaim |
madvise_inject_error | Error injection support for memory error handling. |
shake_page | When a unknown page type is encountered drain as many buffers as possible* in the hope to turn the page into a LRU or free page, which we can handle. |
read_page_owner | |
set_migratetype_isolate |
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 |