Function report |
Source Code:mm\vmscan.c |
Create Date:2022-07-28 14:17:23 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:shrink_slab_memcg
Proto:static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
gfp_t | gfp_mask | |
int | nid | |
struct mem_cgroup * | memcg | |
int | priority |
562 | freed = 0 |
565 | If Not mem_cgroup_online(memcg) Then Return 0 |
568 | If Not rylock for reading -- returns 1 if successful, 0 if contention Then Return 0 |
573 | If Value for the false possibility is greater at compile time(!map) Then Go to unlock |
577 | struct shrink_control sc = {gfp_mask = gfp_mask, current node being shrunk (for NUMA aware shrinkers) = nid, current memcg being shrunk (for memcg aware shrinkers) = memcg, } |
586 | If Not shrinker Then lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers). |
588 | Continue |
592 | If Not memcg_kmem_enabled() && Not (flags & It just makes sense when the shrinker is also MEMCG_AWARE for now,* non-MEMCG_AWARE shrinker should not have this flag set.) Then Continue |
596 | ret = do_shrink_slab( & sc, shrinker, priority) |
597 | If ret == SHRINK_EMPTY Then |
614 | smp_mb__after_atomic() |
615 | ret = do_shrink_slab( & sc, shrinker, priority) |
616 | If ret == SHRINK_EMPTY Then ret = 0 |
618 | Else memcg_set_shrinker_bit(memcg, nid, i) |
628 | unlock : |
630 | Return freed |
Name | Describe |
---|---|
shrink_slab | shrink_slab - shrink slab caches*@gfp_mask: allocation context*@nid: node whose slab caches to target*@memcg: memory cgroup whose slab caches to target*@priority: the reclaim priority* Call the shrink functions to age shrinkable caches |
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 |