Re: [Devel] [PATCH rh7] fs/fuse/dev: improve ->splice() with fragmented memory

2017-11-29 Thread Andrey Ryabinin
On 11/29/2017 05:37 PM, Vasily Averin wrote: > got it, > kvmalloc does not use kmalloc for size <= (16*PAGE_SIZE) > No, it does use kmalloc() first: void *kvmalloc_node(size_t size, gfp_t flags, int node) { gfp_t kmalloc_flags = flags; /* * Make sure that larger

Re: [Devel] [PATCH rh7] fs/fuse/dev: improve ->splice() with fragmented memory

2017-11-29 Thread Andrey Ryabinin
On 11/29/2017 05:31 PM, Vasily Averin wrote: > Could you please elaborate, why it should help in reported case? > It seems for me kvmalloc will push reclaimer first exactly like kmalloc does > right now. > Currently we try to allocate possibly high-order page with GFP_KERNEL flags. For order

Re: [Devel] [PATCH rh7] fs/fuse/dev: improve ->splice() with fragmented memory

2017-11-29 Thread Vasily Averin
got it, kvmalloc does not use kmalloc for size <= (16*PAGE_SIZE) On 2017-11-29 17:31, Vasily Averin wrote: > Could you please elaborate, why it should help in reported case? > It seems for me kvmalloc will push reclaimer first exactly like kmalloc does > right now. > > On 2017-11-29 16:59,

Re: [Devel] [PATCH rh7] fs/fuse/dev: improve ->splice() with fragmented memory

2017-11-29 Thread Vasily Averin
Could you please elaborate, why it should help in reported case? It seems for me kvmalloc will push reclaimer first exactly like kmalloc does right now. On 2017-11-29 16:59, Andrey Ryabinin wrote: > fuse_dev_splice_[read,write]() temporary allocates array of pipe_buffer > structs. Depending on

[Devel] [PATCH rh7] fs/fuse/dev: improve ->splice() with fragmented memory

2017-11-29 Thread Andrey Ryabinin
fuse_dev_splice_[read,write]() temporary allocates array of pipe_buffer structs. Depending on pipe size it could be quite large, thus we stall in high order allocation request. Use kvmalloc() instead of kmalloc() to fallback in vmalloc() if high order page is not available at the moment.

[Devel] [PATCH RH7 3/3] nsfs: add ioctl to get a parent namespace

2017-11-29 Thread Pavel Tikhomirov
Changes: Replace ns_common in args to ns pointer and ns_ops, as we don't have the former. https://jira.sw.ru/browse/PSBM-57362 ms commit a7306ed8d94a ("nsfs: add ioctl to get a parent namespace") Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships.

[Devel] [PATCH RH7 1/3] kernel: add a helper to get an owning user namespace for a namespace

2017-11-29 Thread Pavel Tikhomirov
Changes: We don't have ns_common, so instead use pointer to namespace, and where needed also pass proc_ns_operations. We don't have cgroupns_operations so skip it's hunk. Initial patch doesn't add pidns_owner to pidns_for_children_operations, as there were no such thing in ms in a time of patch,

[Devel] [PATCH RH7 2/3] nsfs: add ioctl to get an owning user namespace for ns file descriptor

2017-11-29 Thread Pavel Tikhomirov
Changes: We have no nsfs.c, so move the code to fs/proc/namespaces.c. Func __ns_get_path's replaced with analog __proc_ns_get_dentry, so pass additional arguments everywhere, skip EAGAIN part as we don't have it in proc_ns_get_dentry. I add expected resulting ns's proc_ns_operations to

[Devel] [PATCH RH7 0/3] ioctl: port NS_GET_USERNS and NS_GET_PARENT

2017-11-29 Thread Pavel Tikhomirov
Need these to be able to enter owner's userns of mountnamespace to have privileges to unmount everything, to uncover dumpable overmounted mounts. NS_GET_PARENT is not a must here but it is nice to have it too for criu. https://jira.sw.ru/browse/PSBM-57362 Rework mainstream patches as we don't