[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj8OCHqYkB2hVQ2FG6n5g4R0H3eetzbo9NrHooY1-4pwg@mail.gmail.com>
Date: Fri, 22 Apr 2022 10:23:36 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrei Vagin <avagin@...il.com>
Cc: kernel test robot <oliver.sang@...el.com>,
Dmitry Safonov <0x7f454c46@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
kernel test robot <lkp@...el.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Pavel Emelyanov <ovzxemul@...il.com>
Subject: Re: [fs/pipe] 5a519c8fe4: WARNING:at_mm/page_alloc.c:#__alloc_pages
On Thu, Apr 21, 2022 at 10:23 PM Andrei Vagin <avagin@...il.com> wrote:
>
> The big advantage of vmsplice is that it can attach real user pages into
> a pipe and then any following changes of these pages by the process
> don't trigger any allocations and extra copies of data. vmsplice in this
> case is fast. After splicing pages to pipes, we resume a process and
> splice pages from pipes to a socket or a file. The whole process of
> dumping process pages is zero-copy.
Hmm. What happens if you just use /proc/<pid>/mem?
That just takes a reference to the tsk->mm. No page copies at all.
After that you can do anything you want to that mm.
Well, anything a /proc/<pid>/mm fd allows, which is mainly read and
write. But it stays around for as long as you keep it open, and
fundamentally stays coherent with that mm, because it *is* that mm.
And it doesn't affect anything else, because all it literally has is
that mm_struct pointer.
Linus
Powered by blists - more mailing lists