From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933188AbcHDJQX (ORCPT ); Thu, 4 Aug 2016 05:16:23 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:36170 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932976AbcHDJQF (ORCPT ); Thu, 4 Aug 2016 05:16:05 -0400 Date: Thu, 4 Aug 2016 12:16:01 +0300 From: "Kirill A. Shutemov" To: zhong jiang Cc: kirill.shutemov@linux.intel.com, Mel Gorman , Michal Hocko , LKML Subject: Re: A question about transparent hugepages Message-ID: <20160804091601.GA12395@node.shutemov.name> References: <57A2BE55.1020302@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57A2BE55.1020302@huawei.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2016 at 12:02:29PM +0800, zhong jiang wrote: > according to the total_mapcount, Different process can map any subpages of the > transparent hugepages. How it can happen to ? For anonymous memory it can only happen over copy-on-write via fork() + munmap() or something in one of the processes. Now we have tmpfs/shmem with huge pages in mainline. In this case you can map any subpage directly from file. -- Kirill A. Shutemov