From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016AbcHVHME (ORCPT ); Mon, 22 Aug 2016 03:12:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:42721 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750974AbcHVHMC (ORCPT ); Mon, 22 Aug 2016 03:12:02 -0400 Subject: Re: [PATCH 2/2] Migrate zone cache from RB-Tree to arrays of descriptors To: Shaun Tancheff , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20160822043402.8855-1-shaun@tancheff.com> <20160822043402.8855-3-shaun@tancheff.com> Cc: Jens Axboe , Jens Axboe , Christoph Hellwig , "James E . J . Bottomley" , "Martin K . Petersen" , Damien Le Moal , Dan Williams , Sagi Grimberg , Mike Christie , Ming Lei , Josh Bingaman , Shaun Tancheff From: Hannes Reinecke Message-ID: Date: Mon, 22 Aug 2016 09:11:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160822043402.8855-3-shaun@tancheff.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/22/2016 06:34 AM, Shaun Tancheff wrote: > Currently the RB-Tree zone cache is fast and flexible. It does > use a rather largish amount of ram. This model reduces the ram > required from 120 bytes per zone to 16 bytes per zone with a > moderate transformation of the blk_zone_lookup() api. > > This model is predicated on the belief that most variations > on zoned media will follow a pattern of using collections of same > sized zones on a single device. Similar to the pattern of erase > blocks on flash devices being progressivly larger 16K, 64K, ... > > The goal is to be able to build a descriptor which is both memory > efficient, performant, and flexible. > > Signed-off-by: Shaun Tancheff > --- > block/blk-core.c | 2 +- > block/blk-sysfs.c | 31 +- > block/blk-zoned.c | 103 +++-- > drivers/scsi/sd.c | 5 +- > drivers/scsi/sd.h | 4 +- > drivers/scsi/sd_zbc.c | 1025 +++++++++++++++++++++++++++--------------------- > include/linux/blkdev.h | 82 +++- > 7 files changed, 716 insertions(+), 536 deletions(-) > Have you measure the performance impact here? The main idea behind using an RB-tree is that each single element will fit in the CPU cache; using an array will prevent that. So we will increase the number of cache flushes, and most likely a performance penalty, too. Hence I'd rather like to see a performance measurement here before going down that road. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)