Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752082AbcDTP7u (ORCPT ); Wed, 20 Apr 2016 11:59:50 -0400 Received: from mail-by2on0126.outbound.protection.outlook.com ([207.46.100.126]:63952 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750828AbcDTP7s (ORCPT ); Wed, 20 Apr 2016 11:59:48 -0400 Authentication-Results: fromorbit.com; dkim=none (message not signed) header.d=none;fromorbit.com; dmarc=none action=none header.from=hpe.com; Message-ID: <5717A768.3090903@hpe.com> Date: Wed, 20 Apr 2016 11:59:36 -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: Dave Chinner CC: "Theodore Ts'o" , Andreas Dilger , , , Tejun Heo , Christoph Lameter , Scott J Norton , Douglas Hatch , Toshimitsu Kani Subject: Re: [PATCH v3 1/2] ext4: Pass in DIO_SKIP_DIO_COUNT flag if inode_dio_begin() called References: <1460484775-33359-1-git-send-email-Waiman.Long@hpe.com> <1460484775-33359-2-git-send-email-Waiman.Long@hpe.com> <20160414031634.GJ10643@dastard> <570FC379.7000107@hpe.com> <20160415081757.GK10643@dastard> <57112235.1090201@hpe.com> <20160415221918.GA21184@destitution> <571539A6.5070401@hpe.com> <20160419230129.GD18517@dastard> In-Reply-To: <20160419230129.GD18517@dastard> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [72.71.243.67] X-ClientProxiedBy: BY2PR05CA059.namprd05.prod.outlook.com (10.141.250.49) To TU4PR84MB0318.NAMPRD84.PROD.OUTLOOK.COM (10.162.186.28) X-MS-Office365-Filtering-Correlation-Id: ea9234ab-80b8-42e2-8b60-08d36934caa0 X-Microsoft-Exchange-Diagnostics: 1;TU4PR84MB0318;2:MzVr1SerhbR1EAhBPUWHOHEVw1PPGYOg3mpXWB/kyMQORkCUi0isB9NPe4Or6tkPxynCGHyGOq1AJU+dCLXc7ZJ6k6zuog731mYhD2Or0TcNpik2nfjRb+Q9kI35FfTUjfWyvFs9SaaPtINWMWytkwj72/dDneUNc933/fQXQpd8ev5ZqWe6Ywpjqg76Lbp5;3:xN4mDFnhkxwV9uIgGGSeLs6c+GTQYrWMJGDHA6QF4ePVihagpI7Ah7I/iN9JtdDzkl0IoDFmszNynEYVgH/QgzV7llrThO9A5/aiC3mYhLEpY4V5FmTpf0lUfilmNg3h;25:GI4kWok99WB0O+NOncaFQ4ZNsPdAi63k660KKm+Iq43u9PkKlrnQBt2f363FsM507B4n0OzlHHAGWGWhQxmsT2WiqPoCzRmsuJwXnAkvY5HXfiqILqp/FwGhtfHYIhbdM8I2azAAez/ss3Y3j/LP1kbXG6lfpKJvN6kWTMKkdPu1QX74Y+BfaJgPLhZrR2MXh4/CTpybYKPsBQiw0Wd9DYMNQwCpncZgdO0SyIc+9x/P94LV/7bdfa151PFr2liGIXzM56RN/JMpL+8JcYhR9+CCsbfh4MvFQ3MWtdayjrjKk6jI0qj0c6f6OrVCG/3az7BIG/kBHRB6BgEMqBzulQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:TU4PR84MB0318; X-LD-Processed: 105b2061-b669-4b31-92ac-24d304d195dc,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;TU4PR84MB0318;20:xl23tf9bgwgonlmB8RhdYDXczItWHU7dW3IIGrrpQjyncTHWvzv3bFdKop4qw8zp/P/TACQ04nHUi1saXBWRb1ElLQb9nUzlNbS8Llmc+LjxQ5odaVoHCssLcFkT0zZ459Z5BQCZtuV807BK0XEedjap98EyyvPxYmE7f/gl11zBCGkRdiqSK7K1E3sOVt8eo9kWcCW6wnA8nFmxh9QZvyVCbaOmrC1K7Hk3JnjmTtKzVx4fCpKL10j7AH/A3+/84dCL493FRD8ZIq2WbwLERRONGF+KlswRQrk3SYVmTw35UnMecQgcZ/vXvvaqbarzEa58l84fy59qwu73hSWCzw==;4:n/qP6OxJAR0GG6Z6w8T+KljH8Jucggmf4IDaqOA+AGF2szEYYyRsq1uNoQmEPK8EJke4fY80cu+zyaKGdJq+zQ2CQUmaWIPgzSl91rcvir31KobF4fM1uR+JUfDYHPLHQC/4+xQeeIcE1t/WSx+1gm4ImAS+Y208pxCWUi4KlCIt7E0s/69FDNa7UEWxHn9qLFC7l7D5q1qIeF49dmFpoJPxBeOBbzR/DfC7dman9IXJ44Iz6PZcQFMAfjGrVSJp+iUpJONlYzT2gKhazPtCl9bP3qHLNavLlg0uHMEamziK+M44FIjUA854SmxCHUEKXKFcFtrzTzd6ELGYTi5+AUgFiyx0XU2o2lAay4AZBYpWIYAXnGCl38L9am+vxBBXjG5rnBER/lU9jjs+yJVVTLTNMmpXtzPvkn3HXtDXwOk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:TU4PR84MB0318;BCL:0;PCL:0;RULEID:;SRVR:TU4PR84MB0318; X-Forefront-PRVS: 0918748D70 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(24454002)(377454003)(66066001)(50466002)(33656002)(80316001)(4326007)(81166005)(42186005)(50986999)(117156001)(87266999)(65956001)(76176999)(65806001)(65816999)(54356999)(47776003)(23756003)(92566002)(4001350100001)(86362001)(83506001)(93886004)(2950100001)(3846002)(2906002)(36756003)(586003)(6116002)(5008740100001)(189998001)(110136002)(230700001)(77096005)(5004730100002)(1096002);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR84MB0318;H:[192.168.142.160];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;TU4PR84MB0318;23:MLGIxRziryDumGGXzOt7t5FUnnCTHJxpDWUeVZR?= =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AnYHuo3yXvD6HSpHPjB2cM4M?= =?iso-8859-1?Q?i0Ia3yZ9x7dRkub3EamejeAbcP6EjAgu34+K1DCX1Vfk5MzG5HRgJBK6b8?= =?iso-8859-1?Q?runD+CbCPiRWSoHb290/PocoCqdORdgWpqyAxQvPoP2HsdKCVVSSYwjCsm?= =?iso-8859-1?Q?w3gSwifoehUkzGkmTIOINTwVzkMgJRwAWmmDK0oJUg=3D?= X-Microsoft-Exchange-Diagnostics: 1;TU4PR84MB0318;5:NoJ2/IIHgO/wR7T2z+/oBdWa/MaSMyzYIesrh5tK2AuNc8RSNuiwzEXkdO0T5f4F/Fsmrc4otPZpH62nzTu/LTOOqKCCpmO/rJMCGm9kHg8V6ZigDGGDRnYxlN7f7xSbIeWbO3oPCrmggMKb+1OTpbgYq+wsc4cPc6nt4vmkF5jUN9Jf9aFypElXYc5TBzaT;24:f9yi39ifuUSnsrf16irah1XWBF6nj6QqeNSjR6b6HUiV5MVYoc34BJHS1/Lfy7C62O54f1qFh7n1EwMvyvSL6l558ARLZxY9b2+Ahglm7bY=;7:zQdJ5jDfr9IOq1JOLBIZORCje75R+9ZhEfSg+HNcvpG28PB5eMLBrYi0UmwMxfztCF5tiUAe5yQA+C2JEYIOTTMWZbi3zB2sCdauWBV7Nqy3aWfW/zvLYM5JDAcQ0remiAAbkCNG95bddahYTSzEsE9+2tV6UFMZ9RZXSdXg0ySqawrgvvTSQ0rSpoKxzKetHdwVzvhMdbM/r2JAmkwYU5DCvu/xMDYTheASHQAOOJM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2016 15:59:43.1074 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR84MB0318 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2140 Lines: 45 On 04/19/2016 07:01 PM, Dave Chinner wrote: > On Mon, Apr 18, 2016 at 03:46:46PM -0400, Waiman Long wrote: >> On 04/15/2016 06:19 PM, Dave Chinner wrote: >>> On Fri, Apr 15, 2016 at 01:17:41PM -0400, Waiman Long wrote: >>>> On 04/15/2016 04:17 AM, Dave Chinner wrote: >>>>> On Thu, Apr 14, 2016 at 12:21:13PM -0400, Waiman Long wrote: >>>>>> What the patch does is to eliminate the innermost >>>>>> inode_dio_begin/end pair. >>>>> Yes, and with that change inode_dio_wait() no longer waits for >>>>> AIO+DIO writes on ext4, hence breaking truncate IO barrier >>>>> requirements of inode_dio_wait(). >>>>> >>>>> Cheers, >>>>> >>>>> Dave. >>>> You are right and thank for pointing this out to me. I think I focus too >>>> much on the dax_do_io() internal and didn't realize that inode_dio_end() can >>>> be deferred in __blockdev_direct_IO(). I will update my patch to eliminate >>>> the extra inode_dio_begin/end pair only for dax_do_io(). >>> Even there there is the risk that a future change will break ext4. >>> the ext4 code needs fixing first, then you can look at skipping the >>> DIO based counting everywhere. >>> >>> i.e. fix the root cause of the problem, don't hack around it or >>> throw band-aids over it. >> I agree that the ext4 code needs fixing w.r.t. the problem that you >> found. That will take more time and testing. In the mean time, I >> think it is OK to pick the low-hanging fruits that are handled by my >> patch. > IOWs, you're saying that you won't fix the problem, because all you > care about is scalability results. This is how we end up with code > that breaks randomly in future because if it doesn't get fixed now, > nobody will fix the underlying problem. So, fix it now, fix it > properly and you still get your scalability improvement without > leaving a landmine that will explode on someone else in future. > > Fix it now, fix it properly. I am not saying that I will not fix it. I am just saying that I need more time to fully understand what code changes need to be done. I am not that well versed in the filesystem internal, though it will be a good learning experience for me. Cheers, Longman