From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933540AbcAYWvT (ORCPT ); Mon, 25 Jan 2016 17:51:19 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38230 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755173AbcAYWvR (ORCPT ); Mon, 25 Jan 2016 17:51:17 -0500 Date: Mon, 25 Jan 2016 14:51:16 -0800 From: Andrew Morton To: Michael Holzheu Cc: Martin Schwidefsky , Heiko Carstens , Gerald Schaefer , linux-mm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] numa: fix /proc//numa_maps for hugetlbfs on s390 Message-Id: <20160125145116.30603e678b1f787d51ab3f5e@linux-foundation.org> In-Reply-To: <1453739442-57738-1-git-send-email-holzheu@linux.vnet.ibm.com> References: <1453739442-57738-1-git-send-email-holzheu@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jan 2016 17:30:42 +0100 Michael Holzheu wrote: > When working with hugetlbfs ptes (which are actually pmds) is not > valid to directly use pte functions like pte_present() because the > hardware bit layout of pmds and ptes can be different. This is the > case on s390. Therefore we have to convert the hugetlbfs ptes first > into a valid pte encoding with huge_ptep_get(). > > Currently the /proc//numa_maps code uses hugetlbfs ptes without > huge_ptep_get(). On s390 this leads to the following two problems: > > 1) The pte_present() function returns false (instead of true) for > PROT_NONE hugetlb ptes. Therefore PROT_NONE vmas are missing > completely in the "numa_maps" output. > > 2) The pte_dirty() function always returns false for all hugetlb ptes. > Therefore these pages are reported as "mapped=xxx" instead of > "dirty=xxx". > > Therefore use huge_ptep_get() to correctly convert the hugetlb ptes. I'm aiming this at 4.5 only. Please let me know if you think that a -stable backport is warranted.