Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp337565rwn; Thu, 8 Sep 2022 02:21:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR49NZ66ZphtUuov2WNo4nMgnp1AY9lG9bAjK9S38USs/nBO8oUluxc0A1AcHNkpDReiyMoY X-Received: by 2002:a17:90a:bf18:b0:200:8a12:d7ad with SMTP id c24-20020a17090abf1800b002008a12d7admr3055541pjs.243.1662628867826; Thu, 08 Sep 2022 02:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662628867; cv=none; d=google.com; s=arc-20160816; b=VG09pwuZFn1LwIGoX9RI70s4y4hz31Nl5uHA+prkLP/5Kc2Wiq5nUkQKeKWkfh0mAH eNdtWoBiu9M0wGGAqJ9w3YJDyzdCA2X0tCJjYwQcke6zCxLi0DkvuU8agB7+hFkctHtM XqVqOHfW4y3/SaYwQj1Jng0ed460GMzSIKnx0tAklhT38z9vLrD+wCce7659szMjZ1N0 MOohQPtZidqUs7JkPIwBJo3Ljhl4YO+i3JMcqpygZbrTXrTH1OKkYkBplfxNXqWj9ZiH LLGJbEBLm60neV5+RZpwEDTCwXJmdUUZwKMPRRW25dwLTQlva5RO7XdMbuU4trnN5WPc XvMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=48LcsDgjIxYPdPBigHvE+EJ2px8jIb3sWmT1t4vPf98=; b=zGpQ9zyV4mRqmZBQmEi4t609kSQ0YlrER848l2m0fUPxU5GPDwkdBHUCY5dw4riAfM kgnC2xypcqkGkJD4cc3ZcBaEVxuYuq5RHl9Fk4plYF3KmZSEZMJjZw6a1XqppUpwffj6 ZM700oWZamlyapbxxOKwCGRQpeFN8dazedlD3WDkuxO67i1Fu4+FmMBleuVwa40Rciiv m6925ndVSTOWt14Uy09hWBGqdeY/QIXsTsd3gqjPqmAxrlq+LPCvoAvKaaoW8dxWPX8T 0PqejpAvLr3Wuue7rIBlqVjYtxK5mzb5JRJxj74BISo2N5eKjx0S3NFB6e+26tAuzZMV mnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="ax/qnY9O"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a170902ce9200b001748ede4e05si21626203plg.119.2022.09.08.02.20.54; Thu, 08 Sep 2022 02:21:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="ax/qnY9O"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbiIHJD2 (ORCPT + 99 others); Thu, 8 Sep 2022 05:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229899AbiIHJD1 (ORCPT ); Thu, 8 Sep 2022 05:03:27 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DA99FD23D for ; Thu, 8 Sep 2022 02:03:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D576133E62; Thu, 8 Sep 2022 09:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1662627804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=48LcsDgjIxYPdPBigHvE+EJ2px8jIb3sWmT1t4vPf98=; b=ax/qnY9O2vEVxqdJuizzYUYjQ48kdTK5JLyVzCYI8OQJ1btYD2gHekTFaCf0aqc+UBWmgW epm/B2O3HflAP9HbUc+bs/NiIkzUFYlF8OC3hL0LHp4w2Jlh6+3I9Mvi91dKrG42sSJGHf hvZiL43SIqDJDd1aSIuu+ZLvT6sHDGU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1662627804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=48LcsDgjIxYPdPBigHvE+EJ2px8jIb3sWmT1t4vPf98=; b=gVAob4V2LRV8ypoVH2F+ONgAbWSIooJtTAo0If7lbn88/ZwTwQ+d+lHWO9SQvrY/Hi7u7Q YhQWJMqe4wh5UpCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BAD5B1322C; Thu, 8 Sep 2022 09:03:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id s3uaLdyvGWPjPAAAMHmgww (envelope-from ); Thu, 08 Sep 2022 09:03:24 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id F0B23A067E; Thu, 8 Sep 2022 11:03:23 +0200 (CEST) Date: Thu, 8 Sep 2022 11:03:23 +0200 From: Jan Kara To: Ojaswin Mujoo Cc: Jan Kara , Ted Tso , linux-ext4@vger.kernel.org, Thorsten Leemhuis , Stefan Wahren , Andreas Dilger Subject: Re: [PATCH 5/5] ext4: Use buckets for cr 1 block scan instead of rbtree Message-ID: <20220908090323.e4enzh5ahxxw64ic@quack3> References: <20220906150803.375-1-jack@suse.cz> <20220906152920.25584-5-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 08-09-22 13:59:58, Ojaswin Mujoo wrote: > Hi Jan, > > On Tue, Sep 06, 2022 at 05:29:11PM +0200, Jan Kara wrote: > > > > ** snip ** > > /* > > * Choose next group by traversing average fragment size tree. Updates *new_cr > Maybe we can change this to "average fragment size list of suitable > order" Right. Fixed. Thanks for catching this. > > - * if cr lvel needs an update. Sets EXT4_MB_SEARCH_NEXT_LINEAR to indicate that > > - * the linear search should continue for one iteration since there's lock > > - * contention on the rb tree lock. > > + * if cr level needs an update. > > */ > > static void ext4_mb_choose_next_group_cr1(struct ext4_allocation_context *ac, > > int *new_cr, ext4_group_t *group, ext4_group_t ngroups) > > { > > struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); > > - int avg_fragment_size, best_so_far; > > - struct rb_node *node, *found; > > - struct ext4_group_info *grp; > > Other than that, this patch along with the updated mb_structs_summary > proc file change looks good to me. Thanks for review & testing! Honza -- Jan Kara SUSE Labs, CR