linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrei Vagin <avagin@gmail.com>
Cc: kernel test robot <oliver.sang@intel.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <lkp@intel.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Pavel Emelyanov <ovzxemul@gmail.com>
Subject: Re: [fs/pipe] 5a519c8fe4: WARNING:at_mm/page_alloc.c:#__alloc_pages
Date: Fri, 22 Apr 2022 10:23:36 -0700	[thread overview]
Message-ID: <CAHk-=wj8OCHqYkB2hVQ2FG6n5g4R0H3eetzbo9NrHooY1-4pwg@mail.gmail.com> (raw)
In-Reply-To: <CANaxB-zDKVtGTRrqh4SpPKS96Ux6s01BL3BdAe-ZY_9HWSX9dw@mail.gmail.com>

On Thu, Apr 21, 2022 at 10:23 PM Andrei Vagin <avagin@gmail.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

  reply	other threads:[~2022-04-22 17:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  7:37 [fs/pipe] 5a519c8fe4: WARNING:at_mm/page_alloc.c:#__alloc_pages kernel test robot
2022-04-20 19:07 ` Linus Torvalds
2022-04-21 15:35   ` Andrei Vagin
2022-04-21 16:30     ` Linus Torvalds
2022-04-21 19:28       ` Linus Torvalds
2022-04-22  5:23         ` Andrei Vagin
2022-04-22 17:23           ` Linus Torvalds [this message]
2022-04-23 20:23             ` Andrei Vagin
2022-04-23 21:02               ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wj8OCHqYkB2hVQ2FG6n5g4R0H3eetzbo9NrHooY1-4pwg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=0x7f454c46@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --cc=ovzxemul@gmail.com \
    --cc=rppt@linux.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).