From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C94C5328B47 for ; Tue, 16 Dec 2025 23:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765928167; cv=none; b=dbrt768/1vNpzktJXSQZ1i6sKSBhaTpgEMSi8s1HTaIsaY45tONht8YwNRE2FTLjGF0N7CWdyoj2ztMCLPwInrGEJQomtpUvAwVeflVLXhhbIqvfaCdgx0WnhJ4v1woZIKGgr7hUiAHwbjgLrpwWCLfHufq582h+U4VE2grzbvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765928167; c=relaxed/simple; bh=EPxpabaG6xA2ZWPpii9OQRflDyARfiJKmlN3zwxmbys=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=n9ncaJtLx1jzoKQ8KLLNPbYiERM69WSZdJKVhSaGTY/DmhN+g5e+bgcppNlLlxPnM6CqHTHZncvT/5ep8e7DYV8fcB3YD/pLxMdpq0K6ROMxtIWHIa2ijTqQMY6wM994bCLw9wV6MN/OqPuhDzAYPRnTvrWTyOOnhJVJE78WHkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=QbHNnQ6M; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="QbHNnQ6M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07D84C4CEF1; Tue, 16 Dec 2025 23:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1765928165; bh=EPxpabaG6xA2ZWPpii9OQRflDyARfiJKmlN3zwxmbys=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QbHNnQ6Mguna2cZyCb+0n3KA3a5xcsr9pb3owveLJmX9oWVyNZopHOaqZvyuF4L9O whzU7mt5FC9Ptgi8jfB9iJ8kyfGriQp0RYqgoBRYvWj++1t8ZH0JfgTw0QeFtInMJD /TvRuZ64GC/J5DzqSn1F5aqhiB2c38VpKyNXLsJc= Date: Tue, 16 Dec 2025 15:36:04 -0800 From: Andrew Morton To: "Uladzislau Rezki (Sony)" Cc: linux-mm@kvack.org, Vishal Moola , Ryan Roberts , Dev Jain , Baoquan He , LKML Subject: Re: [PATCH 2/2] mm/vmalloc: Add attempt_larger_order_alloc parameter Message-Id: <20251216153604.0c00504223d3fad070f2e803@linux-foundation.org> In-Reply-To: <20251216211921.1401147-2-urezki@gmail.com> References: <20251216211921.1401147-1-urezki@gmail.com> <20251216211921.1401147-2-urezki@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 16 Dec 2025 22:19:21 +0100 "Uladzislau Rezki (Sony)" wrote: > Introduce a module parameter to enable or disable the large-order > allocation path in vmalloc. High-order allocations are disabled by > default so far, but users may explicitly enable them at runtime if > desired. > > High-order pages allocated for vmalloc are immediately split into > order-0 pages and later freed as order-0, which means they do not > feed the per-CPU page caches. As a result, high-order attempts tend > to bypass the PCP fastpath and fall back to the buddy allocator that > can affect performance. > > However, when the PCP caches are empty, high-order allocations may > show better performance characteristics especially for larger > allocation requests. > > Since the best strategy is workload-dependent, this patch adds a > parameter letting users to choose whether vmalloc should try > high-order allocations or stay strictly on the order-0 fastpath. > > ... > > +module_param(attempt_larger_order_alloc, int, 0644); We should have user docs, please. Probably in kernel-parameters.txt.