From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760135AbbA3JPb (ORCPT ); Fri, 30 Jan 2015 04:15:31 -0500 Received: from cnbjrel01.sonyericsson.com ([219.141.167.165]:5863 "EHLO cnbjrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760118AbbA3JPP convert rfc822-to-8bit (ORCPT ); Fri, 30 Jan 2015 04:15:15 -0500 From: "Wang, Yalin" To: "'Naoya Horiguchi'" CC: "'akpm@linux-foundation.org'" , "'kirill.shutemov@linux.intel.com'" , "'oleg@redhat.com'" , "'gorcunov@openvz.org'" , "'pfeiner@google.com'" , "'aquini@redhat.com'" , "'linux-kernel@vger.kernel.org'" Date: Fri, 30 Jan 2015 17:15:08 +0800 Subject: RE: [RFC V2] mm:change smaps/pagemap_read calculation behavior Thread-Topic: [RFC V2] mm:change smaps/pagemap_read calculation behavior Thread-Index: AQHQPGETH1JsFCZBxkGED44gkBd835zXvH6AgACiUKA= Message-ID: <35FD53F367049845BC99AC72306C23D1044A02027E08@CNBJMBX05.corpusers.net> References: <35FD53F367049845BC99AC72306C23D1044A02027E04@CNBJMBX05.corpusers.net> <35FD53F367049845BC99AC72306C23D1044A02027E06@CNBJMBX05.corpusers.net> <20150130082344.GA30837@hori1.linux.bs1.fc.nec.co.jp> In-Reply-To: <20150130082344.GA30837@hori1.linux.bs1.fc.nec.co.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Naoya Horiguchi [mailto:n-horiguchi@ah.jp.nec.com] > Sent: Friday, January 30, 2015 4:24 PM > To: Wang, Yalin > Cc: 'akpm@linux-foundation.org'; 'kirill.shutemov@linux.intel.com'; > 'oleg@redhat.com'; 'gorcunov@openvz.org'; 'pfeiner@google.com'; > 'aquini@redhat.com'; 'linux-kernel@vger.kernel.org' > Subject: Re: [RFC V2] mm:change smaps/pagemap_read calculation behavior > > On Fri, Jan 30, 2015 at 03:47:54PM +0800, Wang, Yalin wrote: > > This patch change smaps/pagemap_read pagetable walk behavior, to make > > sure not skip VM_PFNMAP pagetables, > > so that we can calculate COW pages of VM_PFNMAP as normal pages. > > > > Signed-off-by: Yalin Wang > > Hi Yalin, > > The original motivation of the VM_PFNMAP code in pagewalk.c comes from the > following patch: > > commit a9ff785e4437c83d2179161e012f5bdfbd6381f0 > Author: Cliff Wickman > Date: Fri May 24 15:55:36 2013 -0700 > > mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas > > , where Cliff stated that some kind of vma(VM_PFNMAP) caused kernel panic > when walk_page_range() was called over it. So I don't think that re- > enabling > to walk over every vma(VM_PFNMAP) unexceptionally is a good idea. > > If you really want to get some information from a vma(VM_PFNMAP) via these > interfaces, I recommend you to implement proper judging code which returns > 0 for your vma(VM_PFNMAP) and returns 1 for Cliff's vma(VM_PFNMAP). > I see, but I am curious that why kernel panic when I just access process pagetables in page_table_walk()? Is it caused by hardware problem? The reason that I want to enable it is to see some drivers map some COW pages With VM_PFNMAP, so that user space can get correct page allocation info for These COW special pages with VM_PFNMAP flag. Thanks