From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DC8591A1E05 for ; Mon, 29 Aug 2016 13:48:47 -0700 (PDT) Received: by mail-lf0-x241.google.com with SMTP id 33so7481179lfw.3 for ; Mon, 29 Aug 2016 13:48:47 -0700 (PDT) Date: Mon, 29 Aug 2016 23:48:42 +0300 From: "Kirill A. Shutemov" 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-Disposition: inline In-Reply-To: <1472497881-9323-1-git-send-email-toshi.kani@hpe.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Toshi Kani Cc: jack@suse.cz, mawilcox@microsoft.com, hughd@google.com, linux-nvdimm@lists.01.org, david@fromorbit.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, adilger.kernel@dilger.ca, kirill.shutemov@linux.intel.com, linux-fsdevel@vger.kernel.org, tytso@mit.edu, akpm@linux-foundation.org, mike.kravetz@oracle.com List-ID: 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 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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@lists.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> Sender: owner-linux-mm@kvack.org List-ID: 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 -- 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 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