From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751277AbcBKKWg (ORCPT ); Thu, 11 Feb 2016 05:22:36 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:58614 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbcBKKWe (ORCPT ); Thu, 11 Feb 2016 05:22:34 -0500 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: schwidefsky@de.ibm.com X-IBM-RcptTo: linux-arch@vger.kernel.org;linux-kernel@vger.kernel.org Date: Thu, 11 Feb 2016 11:22:23 +0100 From: Martin Schwidefsky To: Vineet Gupta Cc: Andrew Morton , "Kirill A. Shutemov" , "Aneesh Kumar K.V" , "David S. Miller" , Alex Thorlton , Gerald Schaefer , , , , , Andrea Arcangeli Subject: Re: [PATCH 1/2] mm,thp: refactor generic deposit/withdraw routines for wider usage Message-ID: <20160211112223.0acc8237@mschwide> In-Reply-To: <1455182907-15445-2-git-send-email-vgupta@synopsys.com> References: <1455182907-15445-1-git-send-email-vgupta@synopsys.com> <1455182907-15445-2-git-send-email-vgupta@synopsys.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16021110-0041-0000-0000-00000777A267 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 11 Feb 2016 14:58:26 +0530 Vineet Gupta wrote: > Generic pgtable_trans_huge_deposit()/pgtable_trans_huge_withdraw() > assume pgtable_t to be struct page * which is not true for all arches. > Thus arc, s390, sparch end up with their own copies despite no special > hardware requirements (unlike powerpc). s390 does have a special hardware requirement. pgtable_t is an address for a 2K block of memory. It is *not* equivalent to a struct page * which refers to a 4K block of memory. That has been the whole point to introduce pgtable_t. > It seems massaging the code a bit can make it reusbale. Imho the new code for asm-generic looks fine, as long as the override with __HAVE_ARCH_PGTABLE_DEPOSIT/__HAVE_ARCH_PGTABLE_WITHDRAW continues to work I do not mind. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.