Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2208734rdb; Mon, 9 Oct 2023 17:16:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHN13xG6XuVJIjkdIRCv26YEiOM8rlKYqNFqmoDCMOAR2lswl/SVOrQJtsmwpvfjrHufbwb X-Received: by 2002:a05:6358:2496:b0:13a:cb52:4837 with SMTP id m22-20020a056358249600b0013acb524837mr15291288rwc.31.1696897002250; Mon, 09 Oct 2023 17:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696897002; cv=none; d=google.com; s=arc-20160816; b=CfZlHnOTBQ3XQIe7PC3w4sITm6fA9WVld1wWDZ8sf4PnaBoiVFzUnBUcJaiYGsBnaB sm8K2LNJKlnFtM1n8iFZa+S9k+1k66UDP3bOFKZ4rRSQ3i4GUFa2YVr9pbBisvU4xLbv USZyMWGBcwfVhbhcCCzQleO7G5NfCEF2Ly1Okk3NQIPgYrU99wHgtW9o+upTAsMr1Rc1 K3jYU/FbEw5FT6k0UgMMsz77C+bwLA/TZ5DYd4GC15Q7kMbpgPn1hzs5Uu4aJc34g+il pwsK4l8TQf7wkltHHTK8fJULeXDsxGQzsMPlmJ1pvL28eFwUXzjx7I+5w8vY8BeVI662 AOMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=72Q2u7uyEpMo4qn4YZrkB/a8oEVm5Ir2x88QUCLrpoE=; fh=Y1y9I+FBH9NfAnJ5hXRy/EAOAH2Ansp6jXNpw5TWbrk=; b=V/kj2GsJHMbw8RtjTybKkOPaqYwX9JjVwape7/fu3M54L8KD5fBs427cO5yp62XPHY o2LUOSQY+ecu//Cw1hGgBeX1ba+mRFFxGxXaNt5vzOqNkLNTwD4KK1nKHG/7VS/RUpNY mkq3mSPwypxMF6nMO6l2CXuRmQLIUKQxFsZEXT/VapUayTtLjiZTdYuRS96Tj8Q0NxWd T6DahBAgeop+6Kx3pEnkq8Lqz2Cml2tRCnmFBvU8CyhExb7j42t27NTQtRRQAYSNKira LUBGN5xstGJTHjgTMCIkiPzMMy8jwCX6q6M0NfOuMgy6BebsnYK3dwuxyBP0LkX7OWnd u4PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=kwVhcizA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i2-20020a63cd02000000b00585ad175170si10406112pgg.69.2023.10.09.17.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 17:16:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=kwVhcizA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A2948802F57E; Mon, 9 Oct 2023 17:16:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379195AbjJJAOi (ORCPT + 99 others); Mon, 9 Oct 2023 20:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379115AbjJJAOh (ORCPT ); Mon, 9 Oct 2023 20:14:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F48AA4 for ; Mon, 9 Oct 2023 17:14:36 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AE39C433C8; Tue, 10 Oct 2023 00:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1696896875; bh=zQK6y7u6qjXeMUWj/O9jsTYxx+DpeLYJg5CFzqy8x0o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kwVhcizAsN80h0tCt2iFYIUN7yrErpynGIp1vjSejGl9TmwbhGgAINMH6t+xazN2D lEZTBL7xALnNa86mD3nica8e30tilKKsk0MWRVKM0UkxDVMPFeoJTHMD5kZO/ivbl/ 6chrKYnyZvzMQAZAb3IPmigGqjtSPW8raNPQNwGs= Date: Mon, 9 Oct 2023 17:14:15 -0700 From: Andrew Morton To: Zhaoyang Huang Cc: "zhaoyang.huang" , Roman Gushchin , Minchan Kim , Roman Gushchin , 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: <20231009171415.cfc26b45c2f9f4489afe16c2@linux-foundation.org> In-Reply-To: References: <1683782550-25799-1-git-send-email-zhaoyang.huang@unisoc.com> <20231006141750.5423083520f74bc0746fd249@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_SBL_CSS,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 17:16:39 -0700 (PDT) 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. Thanks.