From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B57ACD68E4 for ; Tue, 10 Oct 2023 01:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379295AbjJJBbw (ORCPT ); Mon, 9 Oct 2023 21:31:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379278AbjJJBbv (ORCPT ); Mon, 9 Oct 2023 21:31:51 -0400 Received: from out-203.mta1.migadu.com (out-203.mta1.migadu.com [95.215.58.203]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E329191 for ; Mon, 9 Oct 2023 18:31:49 -0700 (PDT) Date: Mon, 9 Oct 2023 18:31:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1696901508; h=from:from:reply-to:subject:subject: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=Ho1/AhNyD0qYiEmVEK/IfiNfgDoSn0wjA0JY40hhrfo=; b=eRylKYE4l/CKWymVpIyaPDUoBL9vKiqAT0GEXztgMI21lINvE61Io6wKq3XH8UO0uvw7Kb zbCMF2VYFQEJzkDE36IwgbqO9pdqe3JFypmJ8s46vInBChDcv2+24kT6ka2+P/W9iXjMNB /MhETnefBKNjqKZnOhZAD6hR6oLVAjI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Andrew Morton Cc: Zhaoyang Huang , "zhaoyang.huang" , Roman Gushchin , Minchan Kim , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ke.wang@unisoc.com Subject: Re: [PATCHv5] mm: optimization on page allocation when CMA enabled Message-ID: References: <1683782550-25799-1-git-send-email-zhaoyang.huang@unisoc.com> <20231006141750.5423083520f74bc0746fd249@linux-foundation.org> <20231009171415.cfc26b45c2f9f4489afe16c2@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231009171415.cfc26b45c2f9f4489afe16c2@linux-foundation.org> X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 09, 2023 at 05:14:15PM -0700, Andrew Morton wrote: > On Sun, 8 Oct 2023 15:54:40 +0800 Zhaoyang Huang wrote: > > > > Roman previously asked > > > > > > : Also I'm a bit concerned about potential performance implications. > > > : Would be great to provide some benchmarks or some data. Probably it's > > > : ok because of we have pcp caches on top, but I'm not 100% sure. > > > > > > Are you able to perform such testing and tell us the result? > > I have applied this patch in a v5.4 based ANDROID system and got no > > regression problem. Actually, this commit is aimed to have > > alloc_pages(GFP_USER) use CMA instead of stealing U&R(could lead to > > GFP_KERNEL fail) only when zone's free pages and free cma are around > > WATERMARK_LOW/MIN which would NOT affect most scenarios. > > OK, thanks. > > Could the appropriate people please take a look at this? It has been > in mm-unstable since May. I have 2 concerns: 1) it's still hard to understand the commit message and comments, I can only reverse-engineer it based on the code changes; 2) performance concerns I expressed earlier are not addressed. Idk what's a good benchmark for the page allocator, probably something i/o or networking heavy. On the positive side I believe that the patch is solving a real problem.