Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:46:14 |
Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:enable_cpucache
Proto:static int enable_cpucache(struct kmem_cache *cachep, gfp_t gfp)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kmem_cache * | cachep | |
gfp_t | gfp |
3920 | limit = 0 |
3921 | shared = 0 |
3922 | batchcount = 0 |
3924 | err = cache_random_seq_create(cachep, num, gfp) |
3928 | If Not is_root_cache(cachep) Then |
3929 | root = memcg_root_cache(cachep) |
3932 | batchcount = batchcount |
3935 | If limit && shared && batchcount Then Go to skip_setup |
3946 | If The size of an object including metadata > 131072 Then limit = 1 |
3948 | Else if The size of an object including metadata > PAGE_SIZE Then limit = 8 |
3950 | Else if The size of an object including metadata > 1024 Then limit = 24 |
3952 | Else if The size of an object including metadata > 256 Then limit = 54 |
3954 | Else limit = 120 |
3966 | shared = 0 |
3967 | If The size of an object including metadata <= PAGE_SIZE && num_possible_cpus() > 1 Then shared = 8 |
3978 | batchcount = (limit + 1) / 2 |
3979 | skip_setup : |
3980 | err = do_tune_cpucache(cachep, limit, batchcount, shared, gfp) |
3981 | end : |
3982 | If err Then pr_err("enable_cpucache failed for %s, error %d\n", Name (only for display!) , - err) |
3985 | Return err |
Name | Describe |
---|---|
kmem_cache_init_late | |
setup_cpu_cache |
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 |