From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by kanga.kvack.org (Postfix) with ESMTP id 12D0A6B0037 for ; Wed, 24 Sep 2014 05:56:00 -0400 (EDT) Received: by mail-pa0-f51.google.com with SMTP id eu11so6749858pac.38 for ; Wed, 24 Sep 2014 02:55:59 -0700 (PDT) From: "xiaowen.liu@freescale.com" Subject: rss MM_FILEPAGES statistics value issue in kernel memory remap_pfn_range function. Date: Wed, 24 Sep 2014 09:55:56 +0000 Message-ID: Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_e71eda4ca6734380876f0ddbb4e4f258DM2PR03MB432namprd03pro_" MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: "majordomo@kvack.org" Cc: "linux-mm@kvack.org" --_000_e71eda4ca6734380876f0ddbb4e4f258DM2PR03MB432namprd03pro_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi majordomo, Sorry to bother you. I noticed that there are two functions provided to map memory to user space= from kernel: remap_pfn_range and vm_insert_page. There is one difference that vm_insert_page increase task rss MM_FILEPAGES = value. But remap_pfn_range doesn't. The issue is the munmap function will call zap_pte_range to decrease task r= ss MM_FILEPAGES value. So, the task rss MM_FILEPAGES value increase and decrease doesn't match. And there are many places in kernel driver call remap_pfn_range to map memo= ry to user space. I think remap_pfn_range should also increase task rss MM_FILEPAGES value. If there is any misunderstanding, please correct me. Thanks. BestRegards, Ivan.liu --_000_e71eda4ca6734380876f0ddbb4e4f258DM2PR03MB432namprd03pro_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi majordomo,<= /o:p>

 

Sorry to bother you= .

 

I noticed that ther= e are two functions provided to map memory to user space from kernel: remap= _pfn_range and vm_insert_page.

There is one differ= ence that vm_insert_page increase task rss MM_FILEPAGES value. But remap_pf= n_range doesn’t.

The issue is the mu= nmap function will call zap_pte_range to decrease task rss MM_FILEPAGES val= ue.

So, the task rss MM= _FILEPAGES value increase and decrease doesn’t match.

 

And there are many = places in kernel driver call remap_pfn_range to map memory to user space.

 

I think remap_pfn_r= ange should also increase task rss MM_FILEPAGES value.

 

If there is any mis= understanding, please correct me.

Thanks. =

 

 

BestRegards,

Ivan.liu=

 

 

 

 

 

 

 

 

--_000_e71eda4ca6734380876f0ddbb4e4f258DM2PR03MB432namprd03pro_-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org