Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933308AbbHZMeJ (ORCPT ); Wed, 26 Aug 2015 08:34:09 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:55724 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756007AbbHZMeE (ORCPT ); Wed, 26 Aug 2015 08:34:04 -0400 X-AuditID: cbfee61b-f79706d000001b96-0c-55ddb23aeea3 From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <017d01d0da71$5780e8d0$0682ba70$@samsung.com> <20150820174738.GD42028@jaegeuk-mac02.mot-mobility.com> <021801d0dc10$a4d36810$ee7a3830$@samsung.com> <000101d0df19$4aa94c90$dffbe5b0$@samsung.com> <001001d0df1a$ecc3e7f0$c64bb7d0$@samsung.com> <20150825222630.GB12070@jaegeuk-mac02.mot.com> In-reply-to: <20150825222630.GB12070@jaegeuk-mac02.mot.com> Subject: RE: [f2fs-dev] [PATCH 9/9] f2fs: update extent tree in batches Date: Wed, 26 Aug 2015 20:33:22 +0800 Message-id: <001901d0dffb$7d382040$77a860c0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQLNlFL34fZWxqU7h2EUoA+g4rYsxAEyoVBOAdKtSEQA+laREQFgNRv8AWUp87Kb7qDY4A== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsVy+t9jQV2rTXdDDRqPmFo8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDL+/t7GVNAqXTHt4nrmBsZP Il2MnBwSAiYS25deZ4WwxSQu3FvPBmILCcxilOid7tXFyAVkv2KUuH9/A1gRm4CKxPKO/0wg toiAmkTvvilANgcHs4CHxK5jpRD1W5gkfjV8ZQep4RSwllj+swXMFhZwl7h3bypYL4uAqsTP /gOMIDavgKXEgqNT2CFsQYkfk++xgNjMAloS63ceZ4Kw5SU2r3nLDHGogsSOs68ZIW6IkLjT NQWqXlxi45FbLBMYhWYhGTULyahZSEbNQtKygJFlFaNEakFyQXFSeq5RXmq5XnFibnFpXrpe cn7uJkZw0D+T3sF4eJf7IUYBDkYlHt6CzruhQqyJZcWVuYcYJTiYlUR4f3QDhXhTEiurUovy 44tKc1KLDzFKc7AoifPqm2wKFRJITyxJzU5NLUgtgskycXBKNTAqLr7osDey70fv3A8hWr0q VulK252tHPbPiYyqk63VjCm8kv3d5ZTCvkMi5QF3bvPXTLN5n8ATmBa7QLpioWVzgmey2XOx G6tYzwfu8jz5vy3KW7iN8UDYIeWQ4BKhdWtUXjP/967cPUU5Jqdhv0TjrWlLiqddnDV9wkqH WzMsb/eauB0+KKXEUpyRaKjFXFScCACtGYQcdgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3614 Lines: 97 > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Wednesday, August 26, 2015 6:27 AM > To: Chao Yu > Cc: linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > Subject: Re: [f2fs-dev] [PATCH 9/9] f2fs: update extent tree in batches > > On Tue, Aug 25, 2015 at 05:45:53PM +0800, Chao Yu wrote: > > > -----Original Message----- > > > From: Chao Yu [mailto:chao2.yu@samsung.com] > > > Sent: Tuesday, August 25, 2015 5:34 PM > > > To: 'Jaegeuk Kim' > > > Cc: linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > > > Subject: Re: [f2fs-dev] [PATCH 9/9] f2fs: update extent tree in batches > > > > > > > -----Original Message----- > > > > From: Chao Yu [mailto:chao2.yu@samsung.com] > > > > Sent: Friday, August 21, 2015 8:55 PM > > > > To: 'Jaegeuk Kim' > > > > Cc: linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net > > > > Subject: Re: [f2fs-dev] [PATCH 9/9] f2fs: update extent tree in batches > > > > > > > > Hi Jaegeuk, > > > > > > > > > -----Original Message----- > > > > > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > > > > > Sent: Friday, August 21, 2015 1:48 AM > > > > > To: Chao Yu > > > > > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org > > > > > Subject: Re: [PATCH 9/9] f2fs: update extent tree in batches > > > > > > > > > > Hi Chao, > > > > > > > > > > On Wed, Aug 19, 2015 at 07:21:48PM +0800, Chao Yu wrote: > > > > > > This patch introduce a new helper f2fs_update_extent_tree_range > > > > > > which can update extent nodes in extent tree in batches. > > > > > > > > > > > > Now, we use the function to invalidate blocks in batches instead of > > > > > > invalidating them one by one when truncating blocks. > > > > > > > > > > IMO, it's not clear the benefit of this patch in terms of performance and code > > > > > readability versus risky code changes. > > > > > > > > This is only used in truncate path, IMO, in theory, we can gain benefit from > > > > this batch mode operation when truncating frequently. > > > > > > > > I will test the patch for numbers. > > > > > > Since in batched operation is only used in truncation path, I only stat data > > > in that path. And I add below function to test for stating time count. > > > > > > uint64_t rdtsc(void) > > > { > > > uint32_t lo, hi; > > > __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); > > > return (uint64_t)hi << 32 | lo; > > > } > > > > > > My test environment is: ubuntu, intel i7-3770, 16G memory, 256g micron ssd. > > > > > > > Sorry, it's out of format. > > > > a) Removing 128MB file which has one extent node mapping whole range of file: > > 1. dd if=/dev/zero of=/mnt/f2fs/128M bs=1M count=128 > > 2. sync > > 3. rm /mnt/f2fs/128M > > count total average > > f2fs_update_extent_tree_range 33 3321 100.63 > > f2fs_update_extent_cache 32768 7651022 233.49 > > > > b) fsstress: > > fsstress -d /mnt/f2fs -l 5 -n 100 -p 20 > > count total average > > f2fs_update_extent_tree_range 1868 1073762 574.82 > > f2fs_update_extent_cache 31518 11495827 364.74 > > So, the remaining concern is risky big code changes. > Let me take time to review and test this for a while. Thank you! :) > Thank you for the work. :) I wrote a v2 patch, I update performance data newly tested and description in commit log of that patch. Thanks, > > Thanks, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/