From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8439208D0 for ; Tue, 29 Sep 2026 00:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790641696; cv=none; b=U/FzIbWI4O6bwg9oG0KJVcK09lo0YoYtQsyK+AskBFlecBRBNq4Iwag/9nuC2/PjTj4pXeBIqAIWMN3q05t9yPLgjqkBOICc7FsgEhZDxosHEksvCIcVx9WQgUYSbdqlmQvLHfn/k6lrxM+86eBveLypgUf4qr8YP3nMRN7ELLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790641696; c=relaxed/simple; bh=j8XP2E3VMFztqpHb5FzoSCz92hRp2ZQMZAuvQCKYM6U=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=k6Dnvn1qlIqbsyEweDxwUdhe4VP1lmr0i0xnZwQMoPw2vVYcemzT0EnugisWmZhdcA6WHARAweqwgczMrjpHZ4udMrcLUS+wCAlEoqmt4SnwvVMbVKFNNJa+B/WqCfCZr0Ok7FdOK3t9xFidMpxgg37Mk9WO9McZohj8E1ffs54= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bur.io; spf=pass smtp.mailfrom=bur.io; dkim=pass (2048-bit key) header.d=bur.io header.i=@bur.io header.b=WhqxTM2r; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=iOTT6+xE; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bur.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bur.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bur.io header.i=@bur.io header.b="WhqxTM2r"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="iOTT6+xE" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id EDAF01400083; Mon, 28 Sep 2026 20:28:13 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 28 Sep 2026 20:28:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bur.io; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1790641693; x=1790728093; bh=tjebcKQEJydX4Qtpd+/9x b9Pc04WNAKST1CssWP51BM=; b=WhqxTM2rKIG3y6BlbkZQ82nIyL3gz+Ff/JauG Ng6HZ2QIF4xPuNVnJeRtU1kUiKQKpoFNIXbK8PL50r+geG2NWVTyFdgN7SXbmuxM s1RKWCDStaJISqLv4Ua9UcBWZs5QY2esFD9pFknkj7N/DNyFQtniD4dhMC0Yp2RB QF3hKv7ROp95hRfM/7ZetKBfzFsZZngshSXtLnhwvvXl1CfsakwFgvfAhjf7pAvB Hv/UKK9frO6Ufge3NzFzuBYEOVJH4vV+DULsb85+ivID/U9slqv2ueI71+HQMeKq Fr8xHLHJfN8YZvcvk9S8ZcMDmWxoUSynf9PeoCxxKGwpF4ZGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790641693; x=1790728093; bh=tjebcKQEJydX4Qtpd+/9xb9Pc04WNAKST1C ssWP51BM=; b=iOTT6+xEjJngzd0A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ail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Sep 2026 20:28:13 -0400 (EDT) From: Boris Burkov To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH 0/6] btrfs: allocator perf improvements Date: Mon, 28 Sep 2026 17:28:01 -0700 Message-ID: X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Working on the bugs to do with large fs-es and unused block groups https://lore.kernel.org/linux-btrfs/20260916230447.GA1706558@zen.localdomain/T/#t and https://lore.kernel.org/linux-btrfs/cover.1790641111.git.boris@bur.io/T/#t revealed some low hanging fruit in allocation performance for very large mostly full fs-es. The gist is to try to skip unnecessary operations per block group which adds up with 10s of thousands of obviously skippable block groups. Running 20k fallocates in a loop on a sparse file fs improved from ~40s to ~7s. Boris Burkov (6): btrfs: skip unhelpful size class relaxing allocation loops btrfs: don't take block group references in find_free_extent() btrfs: remove redundant checks in find_free_extent() hint path btrfs: factor the find_free_extent() block group skip into a helper btrfs: find_free_extent checks full block groups unlocked btrfs: find_free_extent checks size class unlocked fs/btrfs/extent-tree.c | 88 +++++++++++++++++++++++++++++------------- fs/btrfs/extent-tree.h | 3 ++ 2 files changed, 65 insertions(+), 26 deletions(-) -- 2.55.0