[CRIU] [PATCH 01/16] mem/page-pipe: Eliminate redundant pipe_off setup
Mike Rapoport
rppt at linux.ibm.com
Mon Jul 8 15:33:13 MSK 2019
On Fri, Jul 05, 2019 at 06:37:56PM +0300, Cyrill Gorcunov wrote:
> In case if we may use previous pipe the pipe_off
> get set directly so no need for redundat unconditional
> assignment.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
Not a huge gain, but still
Acked-by: Mike Rapoport <rppt at linux.ibm.com>
> ---
> criu/page-pipe.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/criu/page-pipe.c b/criu/page-pipe.c
> index c32b89332521..33741db4224f 100644
> --- a/criu/page-pipe.c
> +++ b/criu/page-pipe.c
> @@ -104,8 +104,6 @@ static struct page_pipe_buf *ppb_alloc(struct page_pipe *pp,
> return NULL;
> cnt_add(CNT_PAGE_PIPE_BUFS, 1);
>
> - ppb->pipe_off = 0;
> -
> if (prev && ppb_resize_pipe(prev) == 0) {
> /* The previous pipe isn't full and we can continue to use it. */
> ppb->p[0] = prev->p[0];
> @@ -120,6 +118,7 @@ static struct page_pipe_buf *ppb_alloc(struct page_pipe *pp,
> }
> cnt_add(CNT_PAGE_PIPES, 1);
>
> + ppb->pipe_off = 0;
> ppb->pipe_size = fcntl(ppb->p[0], F_GETPIPE_SZ, 0) / PAGE_SIZE;
> pp->nr_pipes++;
> }
> --
> 2.20.1
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
--
Sincerely yours,
Mike.
More information about the CRIU
mailing list