From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]:54948 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755189AbbKRSx1 (ORCPT ); Wed, 18 Nov 2015 13:53:27 -0500 Date: Wed, 18 Nov 2015 11:53:26 -0700 From: Ross Zwisler To: Jeff Moyer Cc: Ross Zwisler , Dan Williams , linux-fsdevel , linux-nvdimm , linux-ext4 , Ross Zwisler Subject: Re: dax pmd fault handler never returns to userspace Message-ID: <20151118185326.GA29052@linux.intel.com> References: <20151118170014.GB10656@linux.intel.com> <20151118182320.GA7901@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 18, 2015 at 01:32:46PM -0500, Jeff Moyer wrote: > Ross Zwisler writes: > > > Yea, my first round of testing was broken, sorry about that. > > > > It looks like this test causes the PMD fault handler to be called repeatedly > > over and over until you kill the userspace process. This doesn't happen for > > XFS because when using XFS this test doesn't hit PMD faults, only PTE faults. > > Hmm, I wonder why not? Well, whether or not you get PMDs is dependent on the block allocator for the filesystem. We ask the FS how much space is contiguous via get_blocks(), and if it's less than PMD_SIZE (2 MiB) we fall back to the regular 4k page fault path. This code all lives in __dax_pmd_fault(). There are also a bunch of other reasons why we'd fall back to 4k faults - the virtual address isn't 2 MiB aligned, etc. It's actually pretty hard to get everything right so you actually get PMD faults. Anyway, my guess is that we're failing to meet one of our criteria in XFS, so we just always fall back to PTEs for this test. > Sounds like that will need investigating as well, right? Yep, on it.