[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170419115125.GA27790@bombadil.infradead.org>
Date: Wed, 19 Apr 2017 04:51:25 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Minchan Kim <minchan@...nel.org>
Cc: Michal Hocko <mhocko@...nel.org>, Christoph Lameter <cl@...ux.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kernel-team@....com,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: copy_page() on a kmalloc-ed page with DEBUG_SLAB enabled (was
"zram: do not use copy_page with non-page alinged address")
On Wed, Apr 19, 2017 at 03:02:37PM +0900, Minchan Kim wrote:
> On Tue, Apr 18, 2017 at 09:33:07AM +0200, Michal Hocko wrote:
> > I do not follow. Why would you need kmap for something that is already
> > in the kernel space?
>
> Because it can work with highmem pages.
That's copy_user_highpage(). If you want to define a new arch API
copy_highpage(), feel free to make a case for it ...
> > > Another approach is the API does normal thing for non-aligned prefix and
> > > tail space and fast thing for aligned space.
> > > Otherwise, it would be happy if the API has WARN_ON non-page SIZE aligned
> > > address.
Why not just use memcpy()? Is copy_page() significantly faster than
memcpy() for a PAGE_SIZE amount of data?
Powered by blists - more mailing lists