From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471AbdJZOYU (ORCPT ); Thu, 26 Oct 2017 10:24:20 -0400 Received: from mga01.intel.com ([192.55.52.88]:59383 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbdJZOYR (ORCPT ); Thu, 26 Oct 2017 10:24:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,434,1503385200"; d="scan'208";a="914039903" Subject: Re: [PATCH 2/2] Add /proc/PID/{smaps, numa_maps} support for DAX To: Michal Hocko References: <1508891255-15427-1-git-send-email-fan.du@intel.com> <1508891255-15427-2-git-send-email-fan.du@intel.com> <20171025093045.s3rpcuovld22bhqu@dhcp22.suse.cz> <1f673f36-74b0-3321-32a4-a8031d5f268a@intel.com> <20171026141604.susqkaniglc5aqw2@dhcp22.suse.cz> Cc: Fan Du , akpm@linux-foundation.org, hch@lst.de, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org From: Dave Hansen Message-ID: <97774073-1df0-328a-68f8-f59667bce168@intel.com> Date: Thu, 26 Oct 2017 07:24:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171026141604.susqkaniglc5aqw2@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/2017 07:16 AM, Michal Hocko wrote: >> The original motivation was for DAX. They have parallel large page >> infrastructure separate from hugetlbfs and THP. Their constraints about >> when they can use large pages differ from the normal mm cases, so it is >> hard to tell when large pages are in use. For instance, the file on >> *disk* has to be 2MB contiguous and aligned to map with 2MB pages even >> if the mmap() address is >2MB and 2MB-aligned. > > I assume there is some tool which is going to use this information? Actually, I don't remember whether it was tooling or just confused humans. I *think* Dan was trying to write test cases for huge page DAX support and couldn't figure out whether or not it was using large pages. >> But, in general, this seems like the thing that we probably should have >> done in the first place for THP. It's a lot more generic and does not >> require someone reading the file to know what the particular >> architecture's page sizes are. > > I fully agree. This just shows how single usecase focus driven smaps > file was. That is why I am asking about usecases when somebody want to > try yet another special field there. Smaps has become a dump of of > special cases which is not really easy to understand and so people tend > to use it incorrectly. We just have to be careful not to cram use-cases into the existing fields which might make them meaningless. I fear that Fan Du's latest patches do that.