From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969064AbdDTGvz (ORCPT ); Thu, 20 Apr 2017 02:51:55 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:57756 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967394AbdDTGuy (ORCPT ); Thu, 20 Apr 2017 02:50:54 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 20 Apr 2017 15:50:28 +0900 From: Minchan Kim To: Sergey Senozhatsky CC: Matthew Wilcox , Michal Hocko , Christoph Lameter , Joonsoo Kim , Andrew Morton , Vlastimil Babka , , , , Sergey Senozhatsky 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") Message-ID: <20170420065028.GA3847@bbox> References: <20170417014803.GC518@jagdpanzerIV.localdomain> <20170418000319.GC21354@bbox> <20170418073307.GF22360@dhcp22.suse.cz> <20170419060237.GA1636@bbox> <20170419115125.GA27790@bombadil.infradead.org> <20170420014542.GA542@jagdpanzerIV.localdomain> MIME-Version: 1.0 In-Reply-To: <20170420014542.GA542@jagdpanzerIV.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/04/20 15:50:28, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/04/20 15:50:28, Serialize complete at 2017/04/20 15:50:28 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 20, 2017 at 10:45:42AM +0900, Sergey Senozhatsky wrote: > On (04/19/17 04:51), Matthew Wilcox wrote: > [..] > > > > > 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? > > that's a good point. > > I was going to ask yesterday - do we even need copy_page()? arch that > provides well optimized copy_page() quite likely provides somewhat > equally optimized memcpy(). so may be copy_page() is not even needed? I don't know. Just I found https://download.samba.org/pub/paulus/ols-2003-presentation.pdf and heard https://lkml.org/lkml/2017/4/10/1270.