Function report |
Source Code:mm\slab.c |
Create Date:2022-07-28 15:46:27 |
| Last Modify:2022-05-23 17:02:55 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:slabinfo_write - Tuning for the slab allocator*@file: unused*@buffer: user buffer*@count: data length*@ppos: unused* Return: %0 on success, negative error code otherwise.
Proto:ssize_t slabinfo_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| const char __user * | buffer | |
| size_t | count | |
| loff_t * | ppos |
| 4171 | If count > MAX_SLABINFO_WRITE Then Return -EINVAL |
| 4173 | If copy_from_user( & kbuf, buffer, count) Then Return -EFAULT |
| 4175 | kbuf[MAX_SLABINFO_WRITE] = '\0' |
| 4180 | tmp = '\0' |
| 4181 | tmp++ |
| 4182 | If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments != 3 Then Return -EINVAL |
| 4186 | mutex_lock( & slab_mutex) |
| 4189 | If Not strcmp(Name (only for display!) , kbuf) Then |
| 4190 | If limit < 1 || batchcount < 1 || batchcount > limit || shared < 0 Then |
| 4192 | res = 0 |
| 4193 | Else |
| 4194 | res = do_tune_cpucache(cachep, limit, batchcount, shared, GFP_KERNEL) |
| 4198 | Break |
| 4204 | Return res |
| 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 |