From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756118AbcH2Usw (ORCPT ); Mon, 29 Aug 2016 16:48:52 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35999 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755345AbcH2Usu (ORCPT ); Mon, 29 Aug 2016 16:48:50 -0400 Date: Mon, 29 Aug 2016 23:48:42 +0300 From: "Kirill A. Shutemov" To: Toshi Kani Cc: akpm@linux-foundation.org, dan.j.williams@intel.com, mawilcox@microsoft.com, ross.zwisler@linux.intel.com, kirill.shutemov@linux.intel.com, david@fromorbit.com, jack@suse.cz, tytso@mit.edu, adilger.kernel@dilger.ca, mike.kravetz@oracle.com, linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, hughd@google.com Subject: Re: [PATCH v4 RESEND 0/2] Align mmap address for DAX pmd mappings Message-ID: <20160829204842.GA27286@node.shutemov.name> References: <1472497881-9323-1-git-send-email-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472497881-9323-1-git-send-email-toshi.kani@hpe.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 Mon, Aug 29, 2016 at 01:11:19PM -0600, Toshi Kani wrote: > When CONFIG_FS_DAX_PMD is set, DAX supports mmap() using pmd page > size. This feature relies on both mmap virtual address and FS > block (i.e. physical address) to be aligned by the pmd page size. > Users can use mkfs options to specify FS to align block allocations. > However, aligning mmap address requires code changes to existing > applications for providing a pmd-aligned address to mmap(). > > For instance, fio with "ioengine=mmap" performs I/Os with mmap() [1]. > It calls mmap() with a NULL address, which needs to be changed to > provide a pmd-aligned address for testing with DAX pmd mappings. > Changing all applications that call mmap() with NULL is undesirable. > > This patch-set extends filesystems to align an mmap address for > a DAX file so that unmodified applications can use DAX pmd mappings. +Hugh Can we get it used for shmem/tmpfs too? I don't think we should duplicate essentially the same functionality in multiple places. -- Kirill A. Shutemov