| To: | Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Jan Kara <jack@xxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-ext4 <linux-ext4@xxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, Linux MM <linux-mm@xxxxxxxxx>, "linux-nvdimm@xxxxxxxxxxxx" <linux-nvdimm@xxxxxxxxxxxx>, X86 ML <x86@xxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <matthew.r.wilcox@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v5 4/7] dax: add support for fsync/sync |
| From: | Dan Williams <dan.j.williams@xxxxxxxxx> |
| Date: | Mon, 21 Dec 2015 09:49:01 -0800 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+DZqAPjBw+zlJpxi2fjfGhR4XJL96FwL0RbNhYmab+w=; b=NlUNoBDBMBEPFScQ5fLVkAUU9c+DdwfDJFTX/oAoiLPb+Ff3Ueup1KH5e2PkkKLSTg hjSTfbiyelHFKg4uZMyclrh2yhoYQUNjhmbKPq+kUa9A2SJoo25kuBCSK0iPMS8DvK6H MX6CFW165ToqW80BdfV4a+gmPZPdb4Sbcjy/pUm9+dXCDIuCH0vmmsnkPSsLWINIyztR EU0f3Zp8GzprSxIfiWZDbcO4z5TW2xIDxCZ1Hcf5IxFHUfCktWaaOdnzZRmGalcOXVqi dFWWKcoZE+LVB3mFCkVoSegGIS1OK1Jw0sH46C3TsaN3Hn0eKn1tB/rAuKg2L5Kj5y9s HVfQ== |
| In-reply-to: | <20151221170545.GA13494@xxxxxxxxxxxxxxx> |
| References: | <1450502540-8744-1-git-send-email-ross.zwisler@xxxxxxxxxxxxxxx> <1450502540-8744-5-git-send-email-ross.zwisler@xxxxxxxxxxxxxxx> <CAPcyv4irspQEPVdYfLK+QfW4t-1_y1gFFVuBm00=i03PFQwEYw@xxxxxxxxxxxxxx> <20151221170545.GA13494@xxxxxxxxxxxxxxx> |
On Mon, Dec 21, 2015 at 9:05 AM, Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> wrote: > On Sat, Dec 19, 2015 at 10:37:46AM -0800, Dan Williams wrote: >> On Fri, Dec 18, 2015 at 9:22 PM, Ross Zwisler >> <ross.zwisler@xxxxxxxxxxxxxxx> wrote: [..] >> Hi Ross, I should have realized this sooner, but what guarantees that >> the address returned by RADIX_DAX_ADDR(entry) is still valid at this >> point? I think we need to store the sector in the radix tree and then >> perform a new dax_map_atomic() operation to either lookup a valid >> address or fail the sync request. Otherwise, if the device is gone >> we'll crash, or write into some other random vmalloc address space. > > Ah, good point, thank you. v4 of this series is based on a version of > DAX where we aren't properly dealing with PMEM device removal. I've got an > updated version that merges with your dax_map_atomic() changes, and I'll add > this change into v5 which I will send out today. Thank you for the > suggestion. > > One clarification, with the code as it is in v4 we are only doing > clflush/clflushopt/clwb instructions on the kaddr we've stored in the radix > tree, so I don't think that there is actually a risk of us doing a "write into > some other random vmalloc address space"? I think at worse we will end up > clflushing an address that either isn't mapped or has been remapped by someone > else. Or are you worried that the clflush would trigger a cache writeback to > a memory address where writes have side effects, thus triggering the side > effect? > > I definitely think it needs to be fixed, I'm just trying to make sure I > understood your comment. True, this would be flushing an address that was dirtied while valid. Should be ok in practice for now since dax is effectively limited to x86, but we should not be leaning on x86 details in an architecture generic implementation like this. |
| Previous by Date: | Re: [PATCH v5 2/7] dax: support dirty DAX entries in radix tree, Ross Zwisler |
|---|---|
| Next by Date: | Re: xfs within one hour after power-on reset , nginx performance is poor and do not have this phenomenon on ext4, Eric Sandeen |
| Previous by Thread: | Re: [PATCH v5 4/7] dax: add support for fsync/sync, Ross Zwisler |
| Next by Thread: | Re: [PATCH v5 4/7] dax: add support for fsync/sync, Dan Williams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |