mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
page-pipe: fix limiting a pipe size
But actually,5a92f100b8probably has to be reverted as a whole. PIPE_MAX_SIZE is the hard limit to avoid PAGE_ALLOC_COSTLY_ORDER allocations in the kernel. But F_SETPIPE_SZ rounds up a requested pipe size to a power-of-2 pages. It means that when we request PIPE_MAX_SIZE that isn't a power-of-2 number, we actually request a pipe size greater than PIPE_MAX_SIZE. Fixes:5a92f100b8("page-pipe: Resize up to PIPE_MAX_SIZE") Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
ff92731690
commit
51533d98ac
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ static inline int ppb_resize_pipe(struct page_pipe_buf *ppb)
|
|||
|
||||
if (new_size > PIPE_MAX_SIZE) {
|
||||
if (ppb->pipe_size < PIPE_MAX_SIZE)
|
||||
ppb->pipe_size = PIPE_MAX_SIZE;
|
||||
new_size = PIPE_MAX_SIZE;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue