From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbdF3TGB (ORCPT ); Fri, 30 Jun 2017 15:06:01 -0400 Received: from mga01.intel.com ([192.55.52.88]:24343 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbdF3TF7 (ORCPT ); Fri, 30 Jun 2017 15:05:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,288,1496127600"; d="scan'208";a="1166758557" Date: Fri, 30 Jun 2017 13:05:56 -0600 From: Ross Zwisler To: Ross Zwisler Cc: Andrew Morton , linux-kernel@vger.kernel.org, "Darrick J. Wong" , "Theodore Ts'o" , Alexander Viro , Andreas Dilger , Christoph Hellwig , Dan Williams , Dave Hansen , Ingo Molnar , Jan Kara , Jonathan Corbet , Matthew Wilcox , Steven Rostedt , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH v3 0/5] DAX common 4k zero page Message-ID: <20170630190556.GB27371@linux.intel.com> Mail-Followup-To: Ross Zwisler , Andrew Morton , linux-kernel@vger.kernel.org, "Darrick J. Wong" , Theodore Ts'o , Alexander Viro , Andreas Dilger , Christoph Hellwig , Dan Williams , Dave Hansen , Ingo Molnar , Jan Kara , Jonathan Corbet , Matthew Wilcox , Steven Rostedt , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org References: <20170628220152.28161-1-ross.zwisler@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170628220152.28161-1-ross.zwisler@linux.intel.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2017 at 04:01:47PM -0600, Ross Zwisler wrote: > When servicing mmap() reads from file holes the current DAX code allocates > a page cache page of all zeroes and places the struct page pointer in the > mapping->page_tree radix tree. This has three major drawbacks: > > 1) It consumes memory unnecessarily. For every 4k page that is read via a > DAX mmap() over a hole, we allocate a new page cache page. This means that > if you read 1GiB worth of pages, you end up using 1GiB of zeroed memory. > > 2) It is slower than using a common zero page because each page fault has > more work to do. Instead of just inserting a common zero page we have to > allocate a page cache page, zero it, and then insert it. > > 3) The fact that we had to check for both DAX exceptional entries and for > page cache pages in the radix tree made the DAX code more complex. > > This series solves these issues by following the lead of the DAX PMD code > and using a common 4k zero page instead. This reduces memory usage and > decreases latencies for some workloads, and it simplifies the DAX code, > removing over 100 lines in total. > > Andrew, I'm still hoping to get this merged for v4.13 if possible. I I have > addressed all of Jan's feedback, but he is on vacation for the next few > weeks so he may not be able to give me Reviewed-by tags. I think this > series is relatively low risk with clear benefits, and I think we should be > able to address any issues that come up during the v4.13 RC series. > > This series has passed my targeted testing and a full xfstests run on both > XFS and ext4. This series has also passed the automated 0-day kernel builds in 168 configs.