Commit Graph

21 Commits

Author SHA1 Message Date
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
Chunguang Xu 36ac6e3ba3 expose taskstats to all netspace
iotop cannot run inside container for taskstats not supporting net
namespace, in order to fix it we set netnsok filed of taskstats object
to true.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
2020-01-02 12:00:26 +08:00
Kaixu Xia 954836b8d1 mounts: add shield mountpoint in container support
Add shield mountpoint in container support
$ echo "set /dev/name /mnt/point" >/proc/tkernel/shield_mounts
to shield the mountpoint
$ echo "clear /dev/name /mnt/point" >/proc/tkernel/shield_mounts
to delete the mountpoint shielded

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-01-02 11:55:00 +08:00
Kaixu Xia 88513dc458 xfs: add kmem_alloc_by_vmalloc and kmem_alloc_large_dump_stack sysctl
Add dump stack logic when kmem_alloc failed.

kmem_alloc_by_vmalloc: when kmem_alloc size larger than PAGE_SIZE*kmem_alloc_by_vmalloc,
use vmalloc instead kmalloc.
kmem_alloc_large_dump_stack: dump info and stack when kmem_alloc size
larger than PAGE_SIZE*kmem_alloc_by_vmalloc.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-01-02 11:54:24 +08:00
Xiaoming Gao c6b4290a20 xfs: set xfs default error level to 5
we need more information when xfs report corruption.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2020-01-02 11:53:51 +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
Liu Hua a9ab22a3dd wathdog: add symbol info when panic by hard lockup
Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:50:31 +08:00
Liu Hua 6591a576a9 ioapic: add pr_info in __assign_irq_vector when vector not assigned
if vector not assigned in vector_irq, do_IRQ will fail and print
warning like "No irq handler for vector (irq -1)"

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:49:40 +08:00
Liu Hua 36318843d4 irq: add more info when interrupt cannot find handler
Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:48:43 +08:00
Liu Hua 5862067548 cpuset: add loadavg calc for each container
calc loadavg for each container using the same algorithm
with the global load.

Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:47:48 +08:00
Liu Hua 8e8d690592 cpuset: add cpuinfo and stat show
We add cpuinfo and stat for each container which
used for docker to get cpu stat just for current
container.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Liu Hua <shookliu@tencent.com>
2020-01-02 11:46:17 +08:00
Xiaoming Gao 34bbe3bcb8 signal: add print_fatal_signals_src_dst sysctl to switch dump fatal signals from sender side
the print_fatal_signals sysctl can only dump fatal signals from receiver's side,
cannot find who and why send these fatal signals, so add a new sysctl
print_fatal_signals_src_dst to switch dump fatal signals from sender side.

Signed-off-by: Xiaoming Gao <newtongao@tencent.com>
2020-01-02 11:44:57 +08:00
Lorin Liu 3dd54ca17c proc: add pid mapping between host and container
create a pid mapping data to parent processes in file  /proc/$PID/status
create a proc file (/proc/$PID/hostinfo), mapping pid data to host pid

Signed-off-by: Lorin Liu <lorinliu@tencent.com>
2020-01-02 11:44:36 +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
Hongbo Li 963299648d net: namespaceify sysctl_tcp_rmem and sysctl_tcp_wmem
upstream commit: 356d1833b638bd465672aefeb71def3ab93fc17d

Note that when a new netns is created, it inherits its
sysctl_tcp_rmem and sysctl_tcp_wmem from initial netns.

This change is needed so that we can refine TCP rcvbuf autotuning,
to take RTT into consideration.

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 11:34:10 +08:00
Hongbo Li c87ad92744 net: allow per netns sysctl_rmem and sysctl_wmem for protos
upstream commit: a3dcaf17ee54f1d01d22cc2b22cab0b4f60d78cf

As we want to gradually implement per netns sysctl_rmem and sysctl_wmem
on per protocol basis, add two new fields in struct proto,
and two new helpers : sk_get_wmem0() and sk_get_rmem0()

First user will be TCP. Then UDP and SCTP can be easily converted,
while DECNET probably wont get this support.

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 11:33:14 +08:00
Hongbo Li d4b4a18384 net: namespaceify sysctl_tcp_workaround_signed_windows
upstream commit: ceef9ab6be7234f9e49f79769e0da88d1dccfcc7

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 11:31:18 +08:00
Hongbo Li 4bd3c7c579 net: namespaceify sysctl_tcp_max_orphans
Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 11:29:45 +08:00
Hongbo Li 26fb4c44c9 net: namespaceify sysctl_tcp_no_delay_ack
isolate sysctl_tcp_no_delay_ack as net namespace

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
2020-01-02 11:29:03 +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