Re: [Devel] [PATCH rh7 1/2] oom: Do not mark victim a task without mm

2022-11-26 Thread nb
On 23.11.22 г. 20:53 ч., Konstantin Khorenko wrote: Currently it's possible to mark a task as a victim even in case it has already cleared its ->mm. This might lead (and leads) to a situation when oom_unlock() believes the OOM context will be released by the "victim" do_exit() -> exit_oom_vict

Re: [Devel] [PATCH v3 RH9] cgroup_freezer: print information about unfreezable process

2022-12-07 Thread nb
On 30.11.22 г. 13:22 ч., Pavel Tikhomirov wrote: Add a sysctl kernel.freeze_cgroup_timeout (default value 30 * HZ). If one writes FROZEN to freezer.state file and after a timeout of kernel.freeze_cgroup_timeout one still reads FREEZING from freezer.state file (meaning that kernel does not succ

Re: [Devel] [PATCH v3 RH9] cgroup_freezer: print information about unfreezable process

2022-12-07 Thread nb
On 7.12.22 г. 14:27 ч., nb wrote: On 30.11.22 г. 13:22 ч., Pavel Tikhomirov wrote: Add a sysctl kernel.freeze_cgroup_timeout (default value 30 * HZ). If one writes FROZEN to freezer.state file and after a timeout of kernel.freeze_cgroup_timeout one still reads FREEZING from freezer.state

Re: [Devel] [PATCH RH9] loadavg: Fix handling of cfs_rq->nr_unint values

2022-12-07 Thread nb
On 7.12.22 г. 20:02 ч., Konstantin Khorenko wrote: BTW, do we need a similar patch for vz7 as well? Looking at the vz7 kernel code I'd say yes since processes can still be woken up on a different CPU than the one they went to sleep on. However, I wonder why this issue hasn't manifested so f

Re: [Devel] [vz7 v2 PATCH 2/2] devcg: Allow wildcard exceptions in DENY child cgroups

2023-01-19 Thread nb
On 19.01.23 г. 17:02 ч., Pavel Tikhomirov wrote: I believe this is not covering all cases, for instance it would break adding rules to second level nested cgroup, if second level nested cgroup is in "default deny" and it's parent is in "default deny" and none of them have CGRP_VE_ROOT set. In

Re: [Devel] [PATCH vz9 v3] mm: per memory cgroup page cache limit

2023-01-24 Thread nb
On 20.01.23 г. 14:39 ч., Alexander Atanasov wrote: From: Andrey Ryabinin Forward port feature: mm: per memory cgroup page cache limit. The original implementation consisted of these commits: commit 758d52e33a67 ("configs: Enable CONFIG_PAGE_EXTENSION") commit 741beaa93c89 ("mm: introduce pag

Re: [Devel] [PATCH 1/3] blk-cbt: Refactor cbt_find_next_extent for readability

2023-01-31 Thread nb
On 31.01.23 г. 19:08 ч., Alexander Atanasov wrote: On 31.01.23 18:27, Alexander Atanasov wrote: Hi, On 31.01.23 14:23, Nikolay Borisov wrote: Replace all shift rights/shift lefts by divide and multiply operations. What's wrong with shifts? I've checked that this doesn't generate worse a

Re: [Devel] [PATCH 1/3] blk-cbt: Refactor cbt_find_next_extent for readability

2023-01-31 Thread nb
On 31.01.23 г. 18:27 ч., Alexander Atanasov wrote: Hi, On 31.01.23 14:23, Nikolay Borisov wrote: Replace all shift rights/shift lefts by divide and multiply operations. What's wrong with shifts? I've checked that this doesn't generate worse assembly and that shifts are indeed continued t

Re: [Devel] [PATCH 2/4] blk-cbt: Factor out common capability check

2023-02-21 Thread nb
On 21.02.23 г. 20:19 ч., Konstantin Khorenko wrote: On 27.01.2023 12:34, Nikolay Borisov wrote: Instead of duplicating CAP_SYS_ADMIN check for every block-cbt ioctl apart from BLKCBTGET simply factor out the check in the beginning of blk_cbt_ioctl. Signed-off-by: Nikolay Borisov ---   block/

Re: [Devel] [PATCH vz9] Revert "userns: associate user_struct with the user_namespace"

2023-03-06 Thread nb
On 7.03.23 г. 5:23 ч., Pavel Tikhomirov wrote: After this revert user_struct->pipe_bufs (and obviousely other fields =) ) becomes shared between root user of container and root user on host, which is likely not what we want, as one ct can make all node starve for pipe buffers now, see PIPE_MI

Re: [Devel] [PATCH vz9] ucounts: Fix ucount incr/decr when uid is changed without changing the underlying user_struct

2023-03-10 Thread nb
On 9.03.23 г. 12:37 ч., Nikolay Borisov wrote: When preforming setuid the general expectation is that the underlying user_struct will also be changed. However, in our kernels this doesn't hold true to the presence of ff716deacf0c ("userns: associate user_struct with the user_namespace"). Runni

Re: [Devel] [PATCH vz9] /proc/self/memflags: allow userspace to set kernel memory allocation flags

2023-03-20 Thread nb
On 20.03.23 г. 11:20 ч., Alexander Atanasov wrote: Currently there is no way to hint the kernel to avoid triggering page reclaims. This can be useful in networked file systems, which can deadlock in the synchronous reclaim path and streaming which can get unexpected jitter when a synchronouse r

Re: [Devel] [PATCH vz7] /proc/self/memflags: allow userspace to set kernel memory allocation flags

2023-03-20 Thread nb
On 20.03.23 г. 11:20 ч., Alexander Atanasov wrote: Currently there is no way to control if page reclaim can be done. This can be useful in networked file systems, which can deadlock in the synchronous reclaim path and streaming which can get unexpected jitter when a synchronouse reclaim is done