Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933800AbYB2Wau (ORCPT ); Fri, 29 Feb 2008 17:30:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755094AbYB2Wam (ORCPT ); Fri, 29 Feb 2008 17:30:42 -0500 Received: from e3.ny.us.ibm.com ([32.97.182.143]:47592 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756158AbYB2Wal (ORCPT ); Fri, 29 Feb 2008 17:30:41 -0500 Subject: Re: [RFC][PATCH] make /proc/pid/pagemap work with huge pages and return page size From: Dave Hansen To: Matt Mackall Cc: Hans Rosenfeld , linux-kernel@vger.kernel.org, Adam Litke , nacc , Jon Tollefson , Adam Litke In-Reply-To: <1204247745.4021.41.camel@cinder.waste.org> References: <20080220135743.GA10127@escobedo.amd.com> <1203733096.14838.154.camel@cinder.waste.org> <1203791461.11305.135.camel@nimitz.home.sr71.net> <20080225120951.GA5963@escobedo.amd.com> <1203964750.28196.7.camel@nimitz.home.sr71.net> <20080226202533.GD5963@escobedo.amd.com> <1204134244.5207.28.camel@nimitz.home.sr71.net> <20080228120055.GF5963@escobedo.amd.com> <1204246151.23269.3.camel@nimitz.home.sr71.net> <1204247745.4021.41.camel@cinder.waste.org> Content-Type: text/plain Date: Fri, 29 Feb 2008 14:30:34 -0800 Message-Id: <1204324234.2086.14.camel@nimitz.home.sr71.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1465 Lines: 32 On Thu, 2008-02-28 at 17:15 -0800, Matt Mackall wrote: > > The only issue is that this is *after* the code has decided that a > > particular virtual area is for huge pages. The best arch-generic > > interface I know for that is: is_vm_hugetlb_page(), but that is > > VMA-based. Perhaps we should change the pagemap walk to pass the VMA > > around. > > I'd rather avoid that. Requiring a VMA to poke at these things shouldn't > -really- be necessary. Yeah, this is strictly true. But, it also assumes that we have all of the data about where large pages are based on the contents of the pagetables alone. It's possible that we can derive this, or code up a bunch of arch-specific functions to do this, but it certainly doesn't exist today. I'm just not keen on going and learning about how each and every architecture encodes hugetlb information in their pagetables. :( The fact is that we treat pagetables in hugetlb areas completely differently than normal pages. All of the generic functions that deal with pagetables magically punt over to the hugetlb code when they see a hugetlb VMA. I think although it isn't strictly necessary, it is going to save a ton of work to just pass the VMAs around. -- Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/