From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161504AbcFIJCc (ORCPT ); Thu, 9 Jun 2016 05:02:32 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:38670 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161171AbcFIJCa (ORCPT ); Thu, 9 Jun 2016 05:02:30 -0400 Date: Thu, 9 Jun 2016 02:02:26 -0700 From: Christoph Hellwig To: Waiman Long Cc: "Theodore Ts'o" , Andreas Dilger , Alexander Viro , Matthew Wilcox , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Chinner , Christoph Hellwig , Jan Kara , Scott J Norton , Douglas Hatch , Toshimitsu Kani Subject: Re: [PATCH 3/3] ext4: Pass DIO_SKIP_DIO_COUNT to dax_do_io Message-ID: <20160609090226.GB16921@infradead.org> References: <1464992897-34063-1-git-send-email-Waiman.Long@hpe.com> <1464992897-34063-4-git-send-email-Waiman.Long@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464992897-34063-4-git-send-email-Waiman.Long@hpe.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 03, 2016 at 06:28:17PM -0400, Waiman Long wrote: > Since all the DAX I/Os are synchronous, there is no need to update > the DIO count in dax_do_io() when the count has already been updated > or the i_rwsem lock (read or write) has or will be taken. > > This patch passes in the DIO_SKIP_DIO_COUNT flag to dax_do_io() to > disable two unneeded atomic operations that can slow thing down in > fast storages like NVDIMM. > > With a 38-threads fio I/O test with 2 shared files (on DAX-mount ext4 > formatted NVDIMM) running on a 4-socket Haswell-EX server with 4.6-rc1 > kernel, the aggregated bandwidths before and after the patch were: Please do the right thing and remove the code to call inode_dio_begin / inode_dio_end entirely. There is nothing ext4 specific about the dax code being synchronous. Together with my previous suggestion that also allows dropping the flags argument. Then as a next step remove the end_io argument and just call it in the callers which is perfectly safe again as dax is synchronous.