From: Christoph Hellwig <hch@infradead.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Rutland <mark.rutland@arm.com>,
Ben Dooks <ben-linux@fluff.org>,
Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Linus Walleij <linus.walleij@linaro.org>,
Palmer Dabbelt <palmerdabbelt@google.com>,
Brendan Higgins <brendanhiggins@google.com>,
zaslonko@linux.ibm.com, Nick Kossifidis <mick@ics.forth.gr>,
Alexander Potapenko <glider@google.com>,
Matthew Wilcox <willy@infradead.org>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Will Deacon <will@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Uwe Kleine-K??nig <uwe@kleine-koenig.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Krzysztof Kozlowski <krzk@kernel.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
AKASHI Takahiro <takahiro.akashi@linaro.org>,
Android Kernel Team <kernel-team@android.com>,
Petr Mladek <pmladek@suse.com>, Marco Elver <elver@google.com>,
Kees Cook <keescook@chromium.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Mark Brown <broonie@kernel.org>,
Gregory Fong <gregory.0xf0@gmail.com>,
Dan Williams <dan.j.williams@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Nick Desaulniers <ndesaulniers@google.com>,
David Gow <davidgow@google.com>,
Randy Dunlap <rdunlap@infradead.org>,
"Vaittinen, Matti" <matti.vaittinen@fi.rohmeurope.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/3] lib: Add a generic copy_oldmem_page()
Date: Tue, 14 Jul 2020 12:05:49 +0100 [thread overview]
Message-ID: <20200714110549.GA22613@infradead.org> (raw)
In-Reply-To: <CAK8P3a0F4JSBAG5B=GRFF9Aw0kJaNd=cph86sHqjAtiONUA-Bw@mail.gmail.com>
On Mon, Jul 13, 2020 at 03:39:17PM +0200, Arnd Bergmann wrote:
> On Mon, Jul 13, 2020 at 3:07 PM Christoph Hellwig <hch@infradead.org> wrote:
> > On Fri, Jul 10, 2020 at 08:55:42PM -0700, Palmer Dabbelt wrote:
> > > +ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
> > > + size_t csize, unsigned long offset,
> > > + int userbuf)
> > > +{
> > > + void *vaddr;
> > > +
> > > + if (!csize)
> > > + return 0;
> > > +
> > > + vaddr = memremap(__pfn_to_phys(pfn), PAGE_SIZE, MEMREMAP_WB);
> > > + if (!vaddr)
> > > + return -ENOMEM;
> >
> > Doing a memremap for every page is very inefficient. Also I don't see
> > why you'd want to even do that. All memory is in the direct mapping
> > for RISC-V. For other architecture that support highmem kmap_atomic_pfn
> > would do the job, which is what I'd use in a generic version.
>
> I would expect the 'oldmem' data to not have a 'struct page', which would
> be a problem at least for the generic implementation of kmap_atomic_pfn()
Why do you expect it to not have a struct page?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-14 11:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-11 3:55 Add and use a generic copy_oldmem_page() Palmer Dabbelt
2020-07-11 3:55 ` [PATCH 1/3] lib: Add " Palmer Dabbelt
2020-07-13 13:06 ` Christoph Hellwig
2020-07-13 13:39 ` Arnd Bergmann
2020-07-14 11:05 ` Christoph Hellwig [this message]
2020-07-14 11:38 ` Arnd Bergmann
2020-07-15 7:03 ` Ard Biesheuvel
2020-07-11 3:55 ` [PATCH 2/3] arm: Use the new " Palmer Dabbelt
2020-07-16 12:54 ` Linus Walleij
2020-07-11 3:55 ` [PATCH 3/3] arm64: " Palmer Dabbelt
2020-07-14 20:37 ` Catalin Marinas
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=20200714110549.GA22613@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=ben-linux@fluff.org \
--cc=bgolaszewski@baylibre.com \
--cc=brendanhiggins@google.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=davidgow@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=gregory.0xf0@gmail.com \
--cc=keescook@chromium.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mchehab+samsung@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mick@ics.forth.gr \
--cc=mingo@kernel.org \
--cc=ndesaulniers@google.com \
--cc=palmer@dabbelt.com \
--cc=palmerdabbelt@google.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rdunlap@infradead.org \
--cc=rppt@linux.ibm.com \
--cc=takahiro.akashi@linaro.org \
--cc=uwe@kleine-koenig.org \
--cc=will@kernel.org \
--cc=willy@infradead.org \
--cc=zaslonko@linux.ibm.com \
/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).