Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751313AbdILEe2 convert rfc822-to-8bit (ORCPT ); Tue, 12 Sep 2017 00:34:28 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:25873 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbdILEe0 (ORCPT ); Tue, 12 Sep 2017 00:34:26 -0400 X-AuditID: b6c32a37-f79886d000004f16-44-59b763d0e892 Mime-Version: 1.0 Subject: Re: [f2fs-dev] [PATCH] f2fs: fix double count on issued discard commands Reply-To: daeho.jeong@samsung.com From: Daeho Jeong To: Jaegeuk Kim CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20170912042916.GA95671@jaegeuk-macbookpro.roam.corp.google.com> X-Drm-Type: N,general X-EPLocale: ko_KR.EUC-KR X-EPWebmail-Msg-Type: personal X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Illegal-Object: Syntax error in X-Sender: address found on vger.kernel.org: X-Sender: =?utf-8?B?U2Ftc3VuZyBFbGVjdHJvbmljcxtTeXN0ZW0gUy8=?= ^-Extraneous program text X-Sender-IP: 10.253.99.247 X-Local-Sender: =?UTF-8?B?7KCV64yA7Zi4G1N5c3RlbSBTL1fqsJzrsJwx6re466O5KOustOyEoCkb?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBFbmdpbmVlci9FeHBlcnQg?= =?UTF-8?B?UHJvZ3JhbW1lcg==?= X-Global-Sender: =?UTF-8?B?RGFlaG8gSmVvbmcbU3lzdGVtIFMvVyBSJkQgR3JvdXAgMRtTYW1zdW5n?= =?UTF-8?B?IEVsZWN0cm9uaWNzG1NlbmlvciBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwGxtDMTBEOTEyMQ==?= Message-ID: <20170912043423epcms1p72de7da42985bf53e94e50ea8474b682c@epcms1p7> Date: Tue, 12 Sep 2017 04:34:23 +0000 X-CMS-MailID: 20170912043423epcms1p72de7da42985bf53e94e50ea8474b682c Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" X-ArchiveUser: EV X-MTR: 20170912043423epcms1p72de7da42985bf53e94e50ea8474b682c CMS-TYPE: 101P X-Brightmail-Tracker: H4sIAAAAAAAAA3WSa0hTYRzGeT1nx6M0Oc5LfwxsHRRS23GbW5uhZSVpViBUkEXYaTuotRs7 TrQbEyzRNApKY0QXzaSVzaS8l2Il3RTLksqyIMsPUYpiESW2447ol749PO/z/v7PeyEx2WMi gsyz5HN2C2uiiUC8+UGMQjFgaMlS/prC9J2Ttwj9qMeF6V/WpOk77z3B9YPtF4gUSXqTu4xI 77g85Zd+6o4bpU81RWbiu50oibUbcvMKODlnMViNeZacZHrnjk0KPS3PtfL5yfQetTKBUWs1 jFqjYxKVe9eotbTcwpq5ZLpQIe6l5XaDzZs1F/FegIljRJ/hOYsx5YDVIXRleNbMOyw5jMFq puUFrMnhRdDx+yZQbvmJMdw2EljoeteMO1FbYDkKIIHSwMfZm34+HQ4DIx6iHAWSMqoVwY3y fu8CSUqpYJhpDRFkCLUdZsdShbiMWgHumTJC0CGUAq6efYgLmqDioLre5S/oUCoKemoG/QUk Rg0jON84jPtmSeF86RdRL4OW+rtI4AdQ2+BN9RGfHQZvb3z392mA998GxJqRUDV9E5vPjPde Qj4dCsdH+kQ/GD797hB9B3zteyFyImB49Cnh000IXjRIhG5AVSD4fNsjDoiH7sb3cyGpt09d 7cc5H6eioWtoSISmwvfS7jko5j3wtSvfMKE/RsWApz1+vsOzoZNin2QYdd5HvngQ/JiukJxG 0a6Fy3UtArkWQJcR5kbhnI0353C8ypaw+Hmb0Ny/jNW1osb+rT2IIhG9ROqsbM6SSdgCvsjc g4DE6FBp1f6WLJnUyBYd4uzWbLvDxPE9yOA9zxksIsxg9f5yS362SpOo1KxWa7UqpV6z2E5Q KtUqpU6XqEv4j00vlYZ7hnbJqBw2nzvIcTbOPj/FjwyIcKLglqS0r1piowHvjevgZXXryLVL 7zSUPC1k/Oqeh7iRB4+5KOmaYPKYseLus9HLtfHrM+jrAa9++peYcLb2pZ0fl7TVRlU3GDMa VJlRf0i8bfDYnsM1sHXzq9RB498PQcOurHNhWyqrag7EbW5/NLqh8ujrvlX9aaRnZezk62Ia 53NZVSxm59l/qp/WaNsDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170912042935epcas1p4630737028cc7b9536a0c688c92084e84 X-RootMTR: 20170912042935epcas1p4630737028cc7b9536a0c688c92084e84 References: <20170912042916.GA95671@jaegeuk-macbookpro.roam.corp.google.com> <20170911033845.53701-1-jaegeuk@kernel.org> <6209aa5a-4d45-ac2b-448a-4b405dfb25d1@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 37 > Yeah, that's exactly like what I made a mistake before. > I should have mentioned that earlier. :) Or I think the previous code which used "iter++" might be right. You might just want to check the fixed number of small discards, DISCARD_ISSUE_RATE, when issue_cond is "true". Anyways, I have another question about this function. How about just issuing, not checking whether it is idle, the fixed number of small discards, DISCARD_ISSUE_RATE, when issue_cond is "true". Actually, the discard commands will be issued as "asynchronous" requests, which has a low priority in the I/O scheduler, so the performance degradation of other threads by doing this will not be much severe, but we can make the performance of the storage device better even if there is no idle. I am just worried about the storage device I/O performance gets worse under I/O intensive senario where there is no idle Thanks,