Cover Letter Detail
Show a cover letter.
GET /api/1.2/covers/829938/?format=api
{ "id": 829938, "url": "http://patchwork.ozlabs.org/api/1.2/covers/829938/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/cover/20171024152415.22864-1-jack@suse.cz/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/1.2/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20171024152415.22864-1-jack@suse.cz>", "list_archive_url": null, "date": "2017-10-24T15:23:57", "name": "[0/17,v5] dax, ext4, xfs: Synchronous page faults", "submitter": { "id": 363, "url": "http://patchwork.ozlabs.org/api/1.2/people/363/?format=api", "name": "Jan Kara", "email": "jack@suse.cz" }, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/cover/20171024152415.22864-1-jack@suse.cz/mbox/", "series": [ { "id": 10008, "url": "http://patchwork.ozlabs.org/api/1.2/series/10008/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=10008", "date": "2017-10-24T15:23:57", "name": "dax, ext4, xfs: Synchronous page faults", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/10008/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/829938/comments/", "headers": { "Return-Path": "<linux-ext4-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-ext4-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yLxt80wmPz9t2c\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 25 Oct 2017 02:25:36 +1100 (AEDT)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932422AbdJXPZd (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 24 Oct 2017 11:25:33 -0400", "from mx2.suse.de ([195.135.220.15]:36038 \"EHLO mx2.suse.de\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751501AbdJXPZa (ORCPT <rfc822;linux-ext4@vger.kernel.org>);\n\tTue, 24 Oct 2017 11:25:30 -0400", "from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\n\tby mx2.suse.de (Postfix) with ESMTP id C963BABB2;\n\tTue, 24 Oct 2017 15:25:27 +0000 (UTC)", "by quack2.suse.cz (Postfix, from userid 1000)\n\tid 4D6571E342B; Tue, 24 Oct 2017 17:25:27 +0200 (CEST)" ], "X-Virus-Scanned": "by amavisd-new at test-mx.suse.de", "From": "Jan Kara <jack@suse.cz>", "To": "Dan Williams <dan.j.williams@intel.com>", "Cc": "Ross Zwisler <ross.zwisler@linux.intel.com>,\n\tChristoph Hellwig <hch@infradead.org>,\n\t<linux-ext4@vger.kernel.org>, linux-nvdimm@lists.01.org,\n\t<linux-fsdevel@vger.kernel.org>, <linux-xfs@vger.kernel.org>,\n\tlinux-api@vger.kernel.org, <linux-mm@kvack.org>, Jan Kara <jack@suse.cz>", "Subject": "[PATCH 0/17 v5] dax, ext4, xfs: Synchronous page faults", "Date": "Tue, 24 Oct 2017 17:23:57 +0200", "Message-Id": "<20171024152415.22864-1-jack@suse.cz>", "X-Mailer": "git-send-email 2.12.3", "Sender": "linux-ext4-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-ext4.vger.kernel.org>", "X-Mailing-List": "linux-ext4@vger.kernel.org" }, "content": "Hello,\n\nhere is the fifth version of my patches to implement synchronous page faults\nfor DAX mappings to make flushing of DAX mappings possible from userspace so\nthat they can be flushed on finer than page granularity and also avoid the\noverhead of a syscall.\n\nWe use a new mmap flag MAP_SYNC to indicate that page faults for the mapping\nshould be synchronous. The guarantee provided by this flag is: While a block\nis writeably mapped into page tables of this mapping, it is guaranteed to be\nvisible in the file at that offset also after a crash.\n\nHow I implement this is that ->iomap_begin() indicates by a flag that inode\nblock mapping metadata is unstable and may need flushing (use the same test as\nwhether fdatasync() has metadata to write). If yes, DAX fault handler refrains\nfrom inserting / write-enabling the page table entry and returns special flag\nVM_FAULT_NEEDDSYNC together with a PFN to map to the filesystem fault handler.\nThe handler then calls fdatasync() (vfs_fsync_range()) for the affected range\nand after that calls DAX code to update the page table entry appropriately.\n\nI did some basic performance testing on the patches over ramdisk - timed\nlatency of page faults when faulting 512 pages. I did several tests: with file\npreallocated / with file empty, with background file copying going on / without\nit, with / without MAP_SYNC (so that we get comparison). The results are\n(numbers are in microseconds):\n\nFile preallocated, no background load no MAP_SYNC:\nmin=9 avg=10 max=46\n8 - 15 us: 508\n16 - 31 us: 3\n32 - 63 us: 1\n\nFile preallocated, no background load, MAP_SYNC:\nmin=9 avg=10 max=47\n8 - 15 us: 508\n16 - 31 us: 2\n32 - 63 us: 2\n\nFile empty, no background load, no MAP_SYNC:\nmin=21 avg=22 max=70\n16 - 31 us: 506\n32 - 63 us: 5\n64 - 127 us: 1\n\nFile empty, no background load, MAP_SYNC:\nmin=40 avg=124 max=242\n32 - 63 us: 1\n64 - 127 us: 333\n128 - 255 us: 178\n\nFile empty, background load, no MAP_SYNC:\nmin=21 avg=23 max=67\n16 - 31 us: 507\n32 - 63 us: 4\n64 - 127 us: 1\n\nFile empty, background load, MAP_SYNC:\nmin=94 avg=112 max=181\n64 - 127 us: 489\n128 - 255 us: 23\n\nSo here we can see the difference between MAP_SYNC vs non MAP_SYNC is about\n100-200 us when we need to wait for transaction commit in this setup. \n\nAnyway, here are the patches and since Ross already posted his patches to test\nthe functionality, I think we are ready to get this merged. I've talked with\nDan and he said he could take the patches through his tree, I'd just like to\nget a final ack from Christoph on the patch modifying mmap(2). Comments are\nwelcome.\n\nChanges since v4:\n* fixed couple of minor things in the manpage\n* make legacy mmap flags always supported, remove them from mask declared\n to be supported by ext4 and xfs\n\nChanges since v3:\n* updated some changelogs\n* folded fs support for VM_SYNC flag into patches implementing the\n functionality\n* removed ->mmap_validate, use ->mmap_supported_flags instead\n* added some Reviewed-by tags\n* added manpage patch\n\nChanges since v2:\n* avoid unnecessary flushing of faulted page (Ross) - I've realized it makes no\n sense to remeasure my benchmark results (after actually doing that and seeing\n no difference, sigh) since I use ramdisk and not real PMEM HW and so flushes\n are ignored.\n* handle nojournal mode of ext4\n* other smaller cleanups & fixes (Ross)\n* factor larger part of finishing of synchronous fault into a helper (Christoph)\n* reorder pfnp argument of dax_iomap_fault() (Christoph)\n* add XFS support from Christoph\n* use proper MAP_SYNC support in mmap(2)\n* rebased on top of 4.14-rc4\n\nChanges since v1:\n* switched to using mmap flag MAP_SYNC\n* cleaned up fault handlers to avoid passing pfn in vmf->orig_pte\n* switched to not touching page tables before we are ready to insert final\n entry as it was unnecessary and not really simplifying anything\n* renamed fault flag to VM_FAULT_NEEDDSYNC\n* other smaller fixes found by reviewers\n\n\t\t\t\t\t\t\t\tHonza" }