Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbdFOAqT (ORCPT ); Wed, 14 Jun 2017 20:46:19 -0400 Received: from g2t2353.austin.hpe.com ([15.233.44.26]:55948 "EHLO g2t2353.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbdFOAqS (ORCPT ); Wed, 14 Jun 2017 20:46:18 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" , "linux-nvdimm@lists.01.org" CC: "dm-devel@redhat.com" , "linux-kernel@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "hch@lst.de" , "x86@kernel.org" , "snitzer@redhat.com" , "linux-fsdevel@vger.kernel.org" Subject: Re: [PATCH v3 02/14] dm: add ->copy_from_iter() dax operation support Thread-Topic: [PATCH v3 02/14] dm: add ->copy_from_iter() dax operation support Thread-Index: AQHS4V9NuqSfayrQ902LcK7VpNo0cqIlHq6A Date: Thu, 15 Jun 2017 00:46:14 +0000 Message-ID: <1497487541.9288.16.camel@hpe.com> References: <149703982465.20620.14881139332926778446.stgit@dwillia2-desk3.amr.corp.intel.com> <149703983692.20620.3787021839815275819.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <149703983692.20620.3787021839815275819.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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.211.195.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0107;7:PvPwzGyKfkG3Itx299hzAEt0Mr68ocvXwffUrxtvDD0fhSn45dnTZ2x8ZQC1az/JbqY0JMvKE0jOPDcMYUr6/m67SjSlozIgd+eJ3tCGNPqraR/Cx2yb63eWC5tsh7lrjVBaXb0xROoeRcyJ4+L1QwWLqQuEAnFi2Pqx3jdbPycoo+nVySZAcigSYNHK+ABUvuQHuR5UWuYeZF0f17I5KxMrc6AsbA5vKA11XWMgZe7z7jTDxzHOssGE0d+67d2MMrIuq5djjm7SWyPxjhhNNu5nfN1bJuzKcamYd4Hvre82L3K6Oe2tuZ565c79fqEbLiJfd6uWzfxzc7r7BquqmA== x-ms-traffictypediagnostic: DF4PR84MB0107: x-ms-office365-filtering-correlation-id: b9c3a5c1-c230-42e5-0d2a-08d4b387ece2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:DF4PR84MB0107; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0107;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0107; x-forefront-prvs: 0339F89554 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39850400002)(39840400002)(39450400003)(39400400002)(39860400002)(377424004)(24454002)(76176999)(25786009)(3846002)(122556002)(4326008)(66066001)(54906002)(33646002)(103116003)(81166006)(478600001)(6436002)(8936002)(8676002)(6512007)(6486002)(50986999)(54356999)(6506006)(86362001)(2501003)(36756003)(189998001)(3660700001)(14454004)(2906002)(2900100001)(305945005)(6246003)(53936002)(2950100002)(5660300001)(3280700002)(229853002)(6116002)(77096006)(38730400002)(7736002)(102836003);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0107;H:DF4PR84MB0105.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2017 00:46:14.0558 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0107 X-OriginatorOrg: hpe.com 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 v5F0kbkA014814 Content-Length: 1768 Lines: 46 On Fri, 2017-06-09 at 13:23 -0700, Dan Williams wrote: > Allow device-mapper to route copy_from_iter operations to the > per-target implementation. In order for the device stacking to work > we > need a dax_dev and a pgoff relative to that device. This gives each > layer of the stack the information it needs to look up the operation > pointer for the next level. > > This conceptually allows for an array of mixed device drivers with > varying copy_from_iter implementations. > > Cc: Toshi Kani > Reviewed-by: Mike Snitzer > Signed-off-by: Dan Williams I was worried about possible overhead with additional stub calls, but it looks fine with a single thread fio write test with direct=1.  92.62%  [kernel.kallsyms]   [k] __copy_user_nocache   0.04%  [kernel.kallsyms]   [k] entry_SYSCALL_64_fastpath   0.08%  libpthread-2.22.so  [.] __GI___libc_write   0.01%  [kernel.kallsyms]   [k] sys_write   0.02%  [kernel.kallsyms]   [k] vfs_write   0.02%  [kernel.kallsyms]   [k] __vfs_write   0.02%  [kernel.kallsyms]   [k] ext4_file_write_iter   0.02%  [kernel.kallsyms]   [k] dax_iomap_rw   0.03%  [kernel.kallsyms]   [k] iomap_apply   0.04%  [kernel.kallsyms]   [k] dax_iomap_actor   0.01%  [kernel.kallsyms]   [k] dax_copy_from_iter   0.01%  [kernel.kallsyms]   [k] dm_dax_copy_from_iter   0.01%  [kernel.kallsyms]   [k] linear_dax_copy_from_iter   0.03%  [kernel.kallsyms]   [k] copy_from_iter_flushcache   0.00%  [kernel.kallsyms]   [k] pmem_copy_from_iter Multi-thread fio test hits hard in inode_lock(), no contention from the dm-layer. Reviewed-by: Toshi Kani Thanks, -Toshi