Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp604179rwl; Sat, 25 Mar 2023 07:48:30 -0700 (PDT) X-Google-Smtp-Source: AKy350bar3RlQdcN41wcEU2kaUeCGd0lemQ7YkFPgf55Bq2SYMQWE2O/+zHJsp0WlXjLqKTbRdQ6 X-Received: by 2002:a05:6402:716:b0:502:2494:b8fc with SMTP id w22-20020a056402071600b005022494b8fcmr4551767edx.7.1679755710318; Sat, 25 Mar 2023 07:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679755710; cv=none; d=google.com; s=arc-20160816; b=zsleZqyd5NNZcpd5JVmPY1S0QySwlNQHvTYdrtZvGjlkNOOEa81qu0zzWrAayfHDTa 5VDy3Q2W54EevJCCf0sZVgSuLoClL9Q14BSSvP9NY3HHINUpP0/qNbFj6sZpyzh3DdaT 4yM+7+DPA89cZoH+eTL5cAbrx+SwCM9nO03JgntmmEvaFReKxyZUzJe2W+fVR8izoqCZ 4zDaHD0szbbPOjj3HlXd8SDC0UN9QgPTq9/IUvIxS7nLj+zNuqV/61IDUv+LOvLRxILe wkYfskw8st/62aabXJ8XxSLudLgxKuLlSs51+5WA9tSieMtPKEhiJYla/qJxdvYzOQUZ OZQQ== 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; bh=nL1zCzPyQOuXPRa9neoTN7K15C+Qg5B46gWFRP2q/6Q=; b=AqMkbkBdmFgtj5dWc2GCu7l0Mihkm+Q8Tp2Mr42vu8RUOIkgNQccn0/ZIJiaov5KnV oANVrpVkZ1bOij9WMm2qcvUYeeZ5KCB1gG+WuQNGx4H8GyEMWjd5AW8xYWL5R6wKA/Eu dvcH6r/JRcWoix810resnaP8gYEu8gAN+ZRYZNVT+zBTmUZU3qcjvCD8YD28Fd1R0sgU HUF9Je2boeNEP0G3AtGHMCBfgC7SyemT2A6+5ZhcklzvyyoGstLuRGg+4e1z4C0lDc3c 8htJH8pzjD3RBVtreY0qLCAxH95oPwdX2NJIVwLV5X8imlIFCCi8IZ01r1kZ09+63igO CPTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nONKV1lO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d27-20020a056402517b00b004fa4bc4a916si7578813ede.555.2023.03.25.07.48.02; Sat, 25 Mar 2023 07:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ibm.com header.s=pp1 header.b=nONKV1lO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbjCYOoJ (ORCPT + 99 others); Sat, 25 Mar 2023 10:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbjCYOoI (ORCPT ); Sat, 25 Mar 2023 10:44:08 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A9B55AD; Sat, 25 Mar 2023 07:44:07 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32PDTA5E018654; Sat, 25 Mar 2023 14:44:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=nL1zCzPyQOuXPRa9neoTN7K15C+Qg5B46gWFRP2q/6Q=; b=nONKV1lOdp7WXENKaTyOw7imY87djMsCiS8tU+7/L3ixwCAxAW9KIBTAjZv4mPvn5ZXp EwnA/Xb85QgLDeRyZKZwxx4mQNZiubxean50FX7hLzLCpAyHfjzeahcmEOJRVK5aCvY9 wx3pViB0xdnw2HeW8f6M4GdS3YPbrJN23UiRnXtxi2gnaf16kluk+yELztro5l5WOrv/ /2qDK+TJN54Tgan9ekGIKYQ5gHlBBXucjHE4oqqpyXNVBGWKlm89PHaEsDFrs6Z4ofuG yaCjGLPmAxoQy2i5hOPe7uaHlNEtOuS72S8QmGniJdfwM01HMlsZi0tFUiIVu8z9Zdtg +A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3phuwq5v5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Mar 2023 14:44:02 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32PEZkhI020221; Sat, 25 Mar 2023 14:44:02 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3phuwq5v4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Mar 2023 14:44:01 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32P2sgd3007243; Sat, 25 Mar 2023 14:43:59 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3phrk6gfn9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Mar 2023 14:43:59 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32PEhvRl41157272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 25 Mar 2023 14:43:57 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9F9820040; Sat, 25 Mar 2023 14:43:56 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 230AB20043; Sat, 25 Mar 2023 14:43:55 +0000 (GMT) Received: from li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com (unknown [9.43.64.140]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Sat, 25 Mar 2023 14:43:54 +0000 (GMT) Date: Sat, 25 Mar 2023 20:13:52 +0530 From: Ojaswin Mujoo To: Jan Kara Cc: linux-ext4@vger.kernel.org, "Theodore Ts'o" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ritesh Harjani , Andreas Dilger Subject: Re: [RFC 08/11] ext4: Don't skip prefetching BLOCK_UNINIT groups Message-ID: References: <4881693a4f5ba1fed367310b27c793e4e78520d3.1674822311.git.ojaswin@linux.ibm.com> <20230309141422.b2nbl554ngna327k@quack3> <20230323105710.mdhamc3hza4223cb@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323105710.mdhamc3hza4223cb@quack3> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ljknFXhlj6fLG35NDOB_4dzFX-e4h7hQ X-Proofpoint-ORIG-GUID: Oib0xDH-P9gNCVMw1PCg0LNWnkY9UduT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-24_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=856 impostorscore=0 adultscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303250120 X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org On Thu, Mar 23, 2023 at 11:57:10AM +0100, Jan Kara wrote: > On Fri 17-03-23 16:25:04, Ojaswin Mujoo wrote: > > On Thu, Mar 09, 2023 at 03:14:22PM +0100, Jan Kara wrote: > > > On Fri 27-01-23 18:07:35, Ojaswin Mujoo wrote: > > > > Currently, ext4_mb_prefetch() and ext4_mb_prefetch_fini() skip > > > > BLOCK_UNINIT groups since fetching their bitmaps doesn't need disk IO. > > > > As a consequence, we end not initializing the buddy structures and CR0/1 > > > > lists for these BGs, even though it can be done without any disk IO > > > > overhead. Hence, don't skip such BGs during prefetch and prefetch_fini. > > > > > > > > This improves the accuracy of CR0/1 allocation as earlier, we could have > > > > essentially empty BLOCK_UNINIT groups being ignored by CR0/1 due to their buddy > > > > not being initialized, leading to slower CR2 allocations. With this patch CR0/1 > > > > will be able to discover these groups as well, thus improving performance. > > > > > > > > Signed-off-by: Ojaswin Mujoo > > > > Reviewed-by: Ritesh Harjani (IBM) > > > > > > The patch looks good. I just somewhat wonder - this change may result in > > > uninitialized groups being initialized and used earlier (previously we'd > > > rather search in other already initialized groups) which may spread > > > allocations more. But I suppose that's fine and uninit groups are not > > > really a feature meant to limit fragmentation and as the filesystem ages > > > the differences should be minimal. So feel free to add: > > > > > > Reviewed-by: Jan Kara > > > > > > Honza > > Thanks for the review. As for the allocation spread, I agree that it > > should be something our goal determination logic should take care of > > rather than limiting the BGs available to the allocator. > > > > Another point I wanted to discuss wrt this patch series was why were the > > BLOCK_UNINIT groups not being prefetched earlier. One point I can think > > of is that this might lead to memory pressure when we have too many > > empty BGs in a very large (say terabytes) disk. > > > > But i'd still like to know if there's some history behind not > > prefetching block uninit. > > Hum, I don't remember anything. Maybe Ted will. You can ask him today on a > call. Unfortunately, couldn't join it last time :) I'll check with him on upcoming Thurs. Regards, ojaswin > > Honza > -- > Jan Kara > SUSE Labs, CR