Commit Graph

15 Commits

Author SHA1 Message Date
charliecgxu 61219f7c16 memcg: add scheduling point while showing memcg usage
Without preemption, if syscall excutes too long it will significantly
affect performance of other important processes. So add a shceduling
point when showing root memcg usage.

Signed-off-by: yongduan <yongduan@tencent.com>
Signed-off-by: charliecgxu <charliecgxu@tencent.com>
2020-10-13 10:13:59 +08:00
Liu Hua 1fe0578c20 cgroup: add switch for subsystem stats isolated
Statictics of memcg, cpuset, cpuacct and blkio export by /proc/
 when switch enabled.

Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-07-16 14:52:41 +08:00
chen xiaoguang 8fe0499fd3 cgroup/memory: add schedule point while showing memory stat
Also a switch had been added to control whether show the
subtree or not.

Signed-off-by: Chen He <heddchen@tencent.com>
Signed-off-by: Peng Zhiguang <zgpeng@tencent.com>
Signed-off-by: Chen Xiaoguang <xiaoggchen@tencent.com>
2020-05-29 10:41:01 +08:00
Kaixu Xia b0e23ef723 pagecachelimit: add the slab(dentry&inode) limit support
Add the support that controlling slab(dentry&inode) limit and the
corresponding sysctl interface.

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-05-29 10:40:24 +08:00
Xiaoming Gao 9de8b674e2 slub: add fast_slub_nr_free to track free objects
use lightweight track method to count free objects in
slub, remove heavy logic in spin_lock_irqsave.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-05-29 10:40:21 +08:00
Xiaoming Gao b5b8c8c22b mm: modify max_map_count_isolated default to zero
Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-05-29 10:39:34 +08:00
zgpeng f2ba303dbd vm: add max_map_count isolate switch
Add the max_map_count isolation switch kernel.isolate_max_map_count;
The isolation of max_map_count is turned on by default. If you want
to turn it off, set kernel.isolate_max_map_count to 0;

Signed-off-by: Zhiguang Peng <zgpeng@tencent.com>
2020-05-29 10:38:28 +08:00
Kaixu Xia de046697ad arm64: implement ftrace with regs by using patchable-function-entry
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-01-02 12:14:57 +08:00
Chunguang Xu 553cf43d1c memcg: fix bug of null pointer accessed when unregister event
When a single eventfd registers multiple events, the unregister operation
of each event is executed by delayed task when eventfd closing. If a new
eventfd registers a new event during the period,  it will cause a crash.
The call stack is as follows:

[ 2677.106372] CPU: 3 PID: 12844 Comm: kworker/3:155 Not tainted 3.10.107-1-tlinux2-0046 #1
[ 2677.106679] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 2677.106992] Workqueue: events cgroup_event_remove
[ 2677.107329] task: ffff880064836440 ti: ffff880064850000 task.ti: ffff880064850000
[ 2677.107623] RIP: 0010:[<ffffffff8116a147>]  [<ffffffff8116a147>] mem_cgroup_usage_unregister_event+0xd7/0x1f0
[ 2677.108090] RSP: 0018:ffff880064853dc0  EFLAGS: 00010202
[ 2677.108328] RAX: 0000000000000001 RBX: ffff88007c6521a8 RCX: 0000000000000001
[ 2677.108810] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8800745d0660
[ 2677.109282] RBP: ffff880064853df0 R08: 0000000000000001 R09: 4540000000000000
[ 2677.109514] R10: dffdbb56d08a68a8 R11: 0000000000000000 R12: ffff880072ed9b00
[ 2677.109994] R13: ffff88007c6521d0 R14: 000000000c38f000 R15: 0000000000000000
[ 2677.110476] FS:  0000000000000000(0000) GS:ffff88007fd80000(0000) knlGS:0000000000000000
[ 2677.111175] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 2677.111619] CR2: 0000000000000004 CR3: 00000000744df000 CR4: 00000000000406e0
[ 2677.112103] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2677.112886] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 2677.113368] Stack:
[ 2677.113611]  0000000000000200 ffff8800732a68a8 ffff8800772a2030 ffff8800732a6840
[ 2677.114744]  00000000000000c0 ffff8800732a68a8 ffff880064853e18 ffffffff810af6ba
[ 2677.116360]  ffff880076f50100 ffff88007fd915c0 ffff88007fd95600 ffff880064853e60
[ 2677.117719] Call Trace:
[ 2677.118194]  [<ffffffff810af6ba>] cgroup_event_remove+0x3a/0x80
[ 2677.118676]  [<ffffffff81064917>] process_one_work+0x177/0x450
[ 2677.119127]  [<ffffffff810657ab>] worker_thread+0x11b/0x390
[ 2677.119575]  [<ffffffff81065690>] ? manage_workers.isra.26+0x290/0x290
[ 2677.120041]  [<ffffffff8106be4f>] kthread+0xcf/0xe0
[ 2677.120470]  [<ffffffff8106bd80>] ? insert_kthread_work+0x40/0x40
[ 2677.120925]  [<ffffffff81aa3e78>] ret_from_fork+0x58/0x90
[ 2677.121365]  [<ffffffff8106bd80>] ? insert_kthread_work+0x40/0x40

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:14:05 +08:00
Chen Xiaoguang dd42f26c8f memory cgroup: fix memory and swap calculation error
Singed-off-by: Chen Xiaoguang <xiaoggchen@tencent.com>
2020-01-02 12:11:18 +08:00
Chunguang Xu e133d113ca pagecachelimit: page cache reclaim asynchronous
add /proc/sys/vm/vm_pagecache_limit_async interface which
allow page caches reclaimed in kpclimitd, it will not consume
work threads runtime, but oom may be occured. it's closed default.

Signed-off-by: Zhiping Du <zhipingdu@tencent.com>
Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:02:39 +08:00
Chunguang Xu 6711b34671 pagecachelimit: limit the pagecache ratio of totalram
limit the pagecache ratio of totalram

Signed-off-by: Zhiping Du <zhipingdu@tencent.com>
Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:01:22 +08:00
Liu Hua ec970f2dff vm:isolate max_map_count by pid namespace
Signed-off-by: Zhiguang Peng <zgpeng@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:51:53 +08:00
chen xiaoguang 4da1c8f92c memcg: add meminfo and vmstat show
We add meminfo and vmstat for each container which
used for docker to get correct data by cmd free, top.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Xiaoguang Chen <xiaoggchen@tencent.com>
2020-01-02 11:44:23 +08:00
Xiaoming Gao 78a8c3c2c2 Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces
Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-01-02 10:51:04 +08:00