From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751222AbdAUQ3D (ORCPT ); Sat, 21 Jan 2017 11:29:03 -0500 Received: from mail-cys01nam02on0134.outbound.protection.outlook.com ([104.47.37.134]:11505 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750900AbdAUQ3C (ORCPT ); Sat, 21 Jan 2017 11:29:02 -0500 From: Matthew Wilcox To: Dan Williams , "linux-nvdimm@lists.01.org" CC: Brian Boylston , Tony Luck , Jan Kara , Toshi Kani , Mike Snitzer , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , Jeff Moyer , Christoph Hellwig , Jens Axboe , "dm-devel@redhat.com" , Ingo Molnar , Al Viro , "H. Peter Anvin" , "linux-fsdevel@vger.kernel.org" , Thomas Gleixner , "Linus Torvalds" , Ross Zwisler Subject: RE: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Thread-Topic: [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Thread-Index: AQHSctDjVbfDIINv4Eya1a6bCbPuuKFCjWQQ Date: Sat, 21 Jan 2017 16:28:52 +0000 Message-ID: References: <148488421301.37913.12835362165895864897.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <148488421301.37913.12835362165895864897.stgit@dwillia2-desk3.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=mawilcox@microsoft.com; x-originating-ip: [24.114.42.119] x-ms-office365-filtering-correlation-id: 3df561cf-3864-4042-46d7-08d4421a9862 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR21MB0035; x-microsoft-exchange-diagnostics: 1;BY2PR21MB0035;7:w4i5Cw1SaMDrq9DUb90NOprTc/698UF1bAVnc7F4stEjFKrrb/9j89+sKHnZwY0AjjJF2N3Ch3e5Sqyxw3CxmL+rHL8UHFhpDabQY8leNa3baRmsKDYvd0lHVgm9GMknbE8T0+waiAaa21wTREkEBYfgsM7Cp6uFm8WLE/wiKOD6ReEcaBi3UDWR9ttUJMqMv6osRwaBIamVXFZLkF94TaNYIgtP3KgJOEHYp2fYCw9sYGdqO+W8XH0zyrgxqaQCDqjK23I5muqTYm0krTPcQNNyQouzcZkiKPG984NIf6COFu0SLs2b7vnxo587gYoQLs/AEGeMvv+VwZSxP1zPUHyuiRCoaIwK0FKYu92szy+xCrF4JjzfNDhkoxDW8b4W9G6Goi7cQHAF+hvWrI3X1oUFtLlxByLS+sSF3aJY/1y1ERW8gXYrMwf+SrVUYm73jmnnEmouD2GxU2Rv2bcNJWHuzPBHfTfsG+I9OnTinnE= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148);SRVR:BY2PR21MB0035;BCL:0;PCL:0;RULEID:;SRVR:BY2PR21MB0035; x-forefront-prvs: 01949FE337 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39410400002)(39850400002)(39860400002)(39450400003)(39840400002)(199003)(189002)(76176999)(54356999)(50986999)(2501003)(66066001)(2900100001)(122556002)(3660700001)(2906002)(5001770100001)(97736004)(7696004)(10090500001)(305945005)(6436002)(5660300001)(92566002)(55016002)(7416002)(99286003)(54906002)(6666003)(6116002)(3846002)(102836003)(6506006)(2950100002)(81166006)(561944003)(9686003)(81156014)(3280700002)(25786008)(8676002)(229853002)(77096006)(189998001)(68736007)(10290500002)(74316002)(5005710100001)(105586002)(106356001)(8990500004)(8936002)(106116001)(38730400001)(86362001)(4326007)(7736002)(86612001)(101416001)(33656002)(53936002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR21MB0035;H:BY2PR21MB0036.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2017 16:28:52.5596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR21MB0035 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v0LGTBKB013670 From: Dan Williams [mailto:dan.j.williams@intel.com] > A couple weeks back, in the course of reviewing the memcpy_nocache() > proposal from Brian, Linus subtly suggested that the pmem specific > memcpy_to_pmem() routine be moved to be implemented at the driver > level [1]: Of course, there may not be a backing device either! That will depend on the filesystem. I see two possible routes here: 1. Add a new address_space_operation: const struct dax_operations *(*get_dax_ops)(struct address_space *); 2. Add two of the dax_operations to address_space_operations: size_t (*copy_from_iter)(struct address_space *, void *, size_t, struct iov_iter *); void (*flush)(struct address_space *, void *, size_t); (we won't need ->direct_access as an address_space op because that'll be handled a different way in the brave new world that supports non-bdev-based filesystems) Obviously in either case we'd have generic bdev versions for ext4, xfs and other block based filesystems, but filesystems with a character device or a network protocol behind them would do whatever it is they need to do. I kind of prefer the second option, but does anyone else have a preference?