Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751580AbdIMHOC (ORCPT ); Wed, 13 Sep 2017 03:14:02 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6044 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdIMHOB (ORCPT ); Wed, 13 Sep 2017 03:14:01 -0400 Subject: Re: [f2fs-dev] [PATCH] f2fs: fix double count on issued discard commands To: , Jaegeuk Kim CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" References: <20170912042916.GA95671@jaegeuk-macbookpro.roam.corp.google.com> <20170911033845.53701-1-jaegeuk@kernel.org> <6209aa5a-4d45-ac2b-448a-4b405dfb25d1@huawei.com> <20170912043423epcms1p72de7da42985bf53e94e50ea8474b682c@epcms1p7> From: Chao Yu Message-ID: Date: Wed, 13 Sep 2017 15:13:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170912043423epcms1p72de7da42985bf53e94e50ea8474b682c@epcms1p7> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0201.59B8DA86.0109,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9bddbb6907e1f56a2885758ef8bb27fd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2073 Lines: 44 On 2017/9/12 12:34, Daeho Jeong wrote: >> 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. Actually, we didn't change priority of discard command, so that it is still synchronous IO for I/O scheduler, hence I/O interference will still exist if we try to issue discard without IO aware ability. Of course we can change the priority of discard command to lower, but potential issue is that with ROW I/O scheduler in kernel or FTL, async I/O will handle very slowly in heavy load scenario, if we are going to trigger sync write IO in place in where we're doing async discard, we will face long latency. Still I think it is worth to build the ability to issue async discard as a part of discard policy and later we can adjust policy based on different scenario. Thanks, > > I am just worried about the storage device I/O performance gets worse > under I/O intensive senario where there is no idle > > Thanks, > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel >