Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbcD2Qii (ORCPT ); Fri, 29 Apr 2016 12:38:38 -0400 Received: from mail-bl2on0102.outbound.protection.outlook.com ([65.55.169.102]:28859 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751847AbcD2Qig (ORCPT ); Fri, 29 Apr 2016 12:38:36 -0400 Authentication-Results: mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=none action=none header.from=hpe.com; Message-ID: <57238DFC.6010108@hpe.com> Date: Fri, 29 Apr 2016 12:38:20 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: "Theodore Ts'o" CC: Waiman Long , Andreas Dilger , Alexander Viro , Matthew Wilcox , , , Dave Chinner , Christoph Hellwig , Scott J Norton , Douglas Hatch , Toshimitsu Kani Subject: Re: [PATCH v5 0/2] ext4: Improve parallel I/O performance on NVDIMM References: <1461947276-25988-1-git-send-email-Waiman.Long@hpe.com> In-Reply-To: <1461947276-25988-1-git-send-email-Waiman.Long@hpe.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [72.71.243.249] X-ClientProxiedBy: BY2PR11CA0078.namprd11.prod.outlook.com (10.163.150.174) To DF4PR84MB0314.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.28) X-MS-Office365-Filtering-Correlation-Id: 647c74c6-3c56-44f9-3228-08d3704cb465 X-Microsoft-Exchange-Diagnostics: 1;DF4PR84MB0314;2:cG7e/xEiR6UW5vKfxw60wOOf0VI29P/SrzSznAHx33cnhVNq7v+aseqbZJaERxjdrFgO5/nVgTuCWIn8LgE4ibpDHArsvO34DgwIJFHg2s1U0BSR3okF20Rzn9S0nFAubgUnu34xKorB0oPR0hiybbxoHXonsvpwZd1WWZjqLEGl4Qg1HyJZ4Zcyul6QvkXm;3:OsI53Pb9aUIohaS7Vvq0pWXhyz2ICav0GTmEifyPLl+DPExym9/B16+mleQT1Clu6W7LFk2QKwKcVq5eyfTTyoo0cavJY+68q42R5azmj8tvh0obDs0UkxeAzX6EuoPY;25:bfXnFZ2vPgt2ys1iUeIeRE3A8BWPA/WBxuIGV6i1a3qFZf73XJ+irxrq56mSwPgGxCFCoLX7Wg9KIneiDyGIyxEXZ/U1x85xobpy3QTtSEIqZd7QHXgl2eHXVc7GYAT+7dJeZXLUb2g68eiofl3AacY1siNexwWlygG5S0n3df8pHnocURx/QcSPedy8i1BXNoi2ygOn6w3BKMub/gonlYlK9BYo97U1Potm/zmU14/9iOfHfu8pfPQ49iqMPiMIFO0GdwnXvbIbNwyQ0BeLDaH5/GjQmJQd/UJ6naJB+sBGZCJnrZk7BJe5HpN911ckh/pPE/XMO9V4lXflkkijaA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0314; X-LD-Processed: 105b2061-b669-4b31-92ac-24d304d195dc,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;DF4PR84MB0314;20:CHzIRV+0nJ117Wdqd+FqtFCPj88Vp/7Xq+V0qdWoAkQjH1AKlSfr3WB4RQqf66D+nvFbRTmYmzMp+VZ13gBQcMtBR6TN4TrSdwEESMDEO121D8Ja2IY65YGX/nbUACubFCs1XLy16xtEsB09f+HTLjXs3BDlfOC5x2HKmCTFkWKZJHNebdgyFSAC9b4cp+XJTRXnKgZHJh7ZB7lzowbMAodlvSxg+5fNs6T6QoeerKcrDHpatROEisWDxUGjjkX48jcSisrdUbiz7DDk1rj0fnf8Xh2b8ZP6yrcBW/HmzfKq3YEoKROBgBA5BFuEd5OWFzQB1h9cfJNb0v4RBmnHpA==;4:qnjJ+vYizKSrmVmj3kO0vEMygy3+5pmyl+HvSQbYRkc1toNEe4oGNyfBeqcjh3XYANAqvzSKesQzJf+nYLDBw7aPKkJhc5MicVS9a2KfSLEvXpWa1lIo8mYDYcqYKr+AJiwNq65DMtCZJxh6nXYQqc7TpVFA0OZD0cY5pA+6DRos6TASju/+KWm6S5YIHlwutaVuYQV0EL9liOvz7BvpfpBKL7zB7hNe2TubqzM7pei7MBeBKGxy/8geqRrYkO+lyH45Mc+/m6TRxtSNNGnBNSxAawgbKeZ9pdoaCWSCfUPc0Tjk1xZJooBjjwNsFlny3v/xbFFW9Y1qZT+kGhH9McWHU5BvY51Vnd97XsR52emzT889x6ogDIDo3q3CQjynXeIZ6ume38Xisdjq9LvHgw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:DF4PR84MB0314;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0314; X-Forefront-PRVS: 0927AA37C7 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(377454003)(24454002)(83506001)(92566002)(47776003)(230700001)(77096005)(42186005)(110136002)(5004730100002)(66066001)(4001350100001)(189998001)(23756003)(1096002)(5008740100001)(64126003)(81166005)(36756003)(6116002)(3846002)(59896002)(50466002)(2950100001)(117156001)(86362001)(2171001)(586003)(4326007)(87266999)(76176999)(50986999)(54356999)(33656002)(2906002);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0314;H:[192.168.142.165];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;DF4PR84MB0314;23:zMjx3/kHZHBBHw09eKpOta6R6j1nZjBUbO0qsXU?= =?iso-8859-1?Q?sXRTjpeXOg5KDE3QDf4soGIF9kRux/e4Arsr/d7nFDd6TQWKZTXiKGXN/F?= =?iso-8859-1?Q?2t0rH1XnW/k8jYTQSmm7fm9RcipRTMMKRfNrEfKgB7yshcmKxEYSyMOpsa?= =?iso-8859-1?Q?+W1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5lvC4A?= X-Microsoft-Exchange-Diagnostics: 1;DF4PR84MB0314;5:/+jHCor85rebaW5ie5hZhy9n8ohYR2olYilzaO18ZM7xEGOXHHHVtZ/CwT9toiizlMs4xEyyVX0acEA+Husnc/LOLjITqBHhZc5oLLVe4t4zzOol3gW5sST/OWNdm76QJSTZ8zuKfBCvpx9CsxAa0A==;24:S8l/VGqAcHDseJNumYe8TwuIxjAr9HN8IAnnQ/h652ogGs71eESKzybrii1mrBJxFm6lEJeq+EDnr8lo0i51ZVVsw2Z1TmTjT7sDy+BXX1s=;7:G5ffnAsMKmTfepaF15RN5EMq4yS24dTFbp2NTf0KJdlsg3WpOQV47HhofKsXL08YPYmTzZw0fWcugVR5GWjDg6ahVFrkNoGSII7b1vP0kQyPANZ8kz6J21fXWU5RHRl2umWDVUqXROlk9/CJkky/F/cadGd1SzQNR19ELDRdL5lPegHd8MBoS4d5khWwATmj SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2016 16:38:30.5883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0314 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1914 Lines: 51 On 04/29/2016 12:27 PM, Waiman Long wrote: > v4->v5: > - Change patch 1 to disable i_dio_count update in do_dax_io(). > > v3->v4: > - For patch 1, add the DIO_SKIP_DIO_COUNT flag to dax_do_io() calls > only to address issue raised by Dave Chinner. > > v2->v3: > - Remove the percpu_stats helper functions and use percpu_counters > instead. > > v1->v2: > - Remove percpu_stats_reset() which is not really needed in this > patchset. > - Move some percpu_stats* functions to the newly created > lib/percpu_stats.c. > - Add a new patch to support 64-bit statistics counts in 32-bit > architectures. > - Rearrange the patches by moving the percpu_stats patches to the > front followed by the ext4 patches. > > This patchset aims to improve parallel I/O performance of the ext4 > filesystem on DAX. > > Patch 1 disables update of the i_dio_count as all DAX I/Os are synchronous > and should be protected from whatever locking was done by the filesystem > caller or within dax_do_io() for read (DIO_LOCKING). > > Patch 2 converts some ext4 statistics counts into percpu counts using > the helper functions. > > Waiman Long (2): > dax: Don't touch i_dio_count in dax_do_io() > ext4: Make cache hits/misses per-cpu counts > > fs/dax.c | 14 ++++++-------- > fs/ext4/extents_status.c | 38 +++++++++++++++++++++++++++++--------- > fs/ext4/extents_status.h | 4 ++-- > 3 files changed, 37 insertions(+), 19 deletions(-) > From my testing, it looked like that parallel overwrites to the same file in an ext4 filesystem on DAX can happen in parallel even if their range overlaps. It was mainly because the code will drop the i_mutex before the write. That means the overlapped blocks can get garbage. I think this is a problem, but I am not expert in the ext4 filesystem to say for sure. I would like to know your thought on that. Thanks, Longman