Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932073AbdDRNOA (ORCPT ); Tue, 18 Apr 2017 09:14:00 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35028 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756467AbdDRNN4 (ORCPT ); Tue, 18 Apr 2017 09:13:56 -0400 Date: Tue, 18 Apr 2017 06:13:49 -0700 From: Matthew Wilcox To: Christoph Lameter Cc: Sergey Senozhatsky , Minchan Kim , Joonsoo Kim , Andrew Morton , Michal Hocko , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, 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: <20170418131349.GA18505@bombadil.infradead.org> References: <20170417014803.GC518@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 442 Lines: 11 On Mon, Apr 17, 2017 at 10:20:42AM -0500, Christoph Lameter wrote: > Simple solution is to not allocate pages via the slab allocator but use > the page allocator for this. The page allocator provides proper alignment. > > There is a reason it is called the page allocator because if you want a > page you use the proper allocator for it. Previous discussion on this topic: https://lwn.net/Articles/669015/ https://lwn.net/Articles/669020/