Function report |
Source Code:mm\percpu.c |
Create Date:2022-07-28 14:27:29 |
Last Modify:2022-05-23 13:52:24 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Balance work is used to populate or destroy chunks asynchronously. We* try to keep the number of populated free pages between* PCPU_EMPTY_POP_PAGES_LOW and HIGH for atomic allocations and at most one* empty chunk.
Proto:static void pcpu_balance_workfn(struct work_struct *work)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct work_struct * | work |
1837 | free_head = pcpu_slot[pcpu_nr_slots - 1] |
1845 | mutex_lock( & pcpu_alloc_mutex) |
1846 | spin_lock_irq( & pcpu_lock) |
1849 | WARN_ON( no [de]population allowed ) |
1858 | spin_unlock_irq( & pcpu_lock) |
1866 | spin_lock_irq( & pcpu_lock) |
1868 | spin_unlock_irq( & pcpu_lock) |
1870 | pcpu_destroy_chunk(chunk) |
1871 | cond_resched() |
1884 | retry_pop : |
1885 | If pcpu_atomic_alloc_failed Then |
1888 | pcpu_atomic_alloc_failed = false |
1889 | Else |
1895 | When slot < pcpu_nr_slots cycle |
1896 | nr_unpop = 0 |
1898 | If Not nr_to_pop Then Break |
1901 | spin_lock_irq( & pcpu_lock) |
1904 | If nr_unpop Then Break |
1907 | spin_unlock_irq( & pcpu_lock) |
1909 | If Not nr_unpop Then Continue |
1915 | nr = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(re - rs, nr_to_pop) |
1918 | If Not ret Then |
1920 | spin_lock_irq( & pcpu_lock) |
1922 | spin_unlock_irq( & pcpu_lock) |
1923 | Else |
1924 | nr_to_pop = 0 |
1927 | If Not nr_to_pop Then Break |
1932 | If nr_to_pop Then |
1934 | chunk = pcpu_create_chunk(gfp) |
1935 | If chunk Then |
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 |