From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C5D12FFDE6 for ; Mon, 5 Jan 2026 16:17:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767629876; cv=none; b=SxnZiZkBYVfWXphLgByuInMdxybKRHuJo41JawC+QCZPoHyaaH3MXejuYFCGmruk2o27iSuAZQ06GVJ5RIb+P3hgUykNYLqKo+ZwXEOIpiZz/4yOOKZHDJlx4Fc//hM8jrORGTmQM0ADyHpvUNTF/RGDrZg4XowGm1nDdgKeYIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767629876; c=relaxed/simple; bh=KbMI2ZjKa21J8KZK6dHQrjcwXxXNg+lu5Bwv4g9KWLQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=D2m9uHoonjBRTxNvV02/OlGDi7j0+nCFEtqBsGA2N6S0ERjOqzehrSmd855uPAGHQbeHWfXEUADWzg5SDDkIhHVlfCF6mgc3OPs8I9FMlgLd4SFMw5U0/ENXYCyTUS9X9P9XywGg8Ecu0WV4C9d8H5upEj/vWpuco81tgM4FwLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 89D63339; Mon, 5 Jan 2026 08:17:46 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 840A63F6A8; Mon, 5 Jan 2026 08:17:51 -0800 (PST) From: Ryan Roberts To: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Uladzislau Rezki , "Vishal Moola (Oracle)" Cc: Ryan Roberts , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/2] Free contiguous order-0 pages efficiently Date: Mon, 5 Jan 2026 16:17:36 +0000 Message-ID: <20260105161741.3952456-1-ryan.roberts@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi All, A recent change to vmalloc caused some performance benchmark regressions (see [1]). I'm attempting to fix that (and at the same time signficantly improve beyond the baseline) by freeing a contiguous set of order-0 pages as a batch. At the same time I observed that free_contig_range() was essentially doing the same thing as vfree() so I've fixed it there too. I think I've convinced myself that free_pages_prepare() per order-0 page followed by a single free_frozen_page_commit() or free_one_page() for the high order block is safe/correct, but would be good if a page_alloc expert can confirm! Applies against today's mm-unstable (344d3580dacd). All mm selftests run and pass. Thanks, Ryan Ryan Roberts (2): mm/page_alloc: Optimize free_contig_range() vmalloc: Optimize vfree include/linux/gfp.h | 1 + mm/page_alloc.c | 116 +++++++++++++++++++++++++++++++++++++++----- mm/vmalloc.c | 29 +++++++---- 3 files changed, 125 insertions(+), 21 deletions(-) -- 2.43.0