Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp491853pxv; Fri, 9 Jul 2021 02:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysPgHhlwcqyhLa9M6iypdXEvQyTIIYlO+emwqsx487u3W+EoCeIu/rmfv5Avav8KfFGlb/ X-Received: by 2002:a05:6e02:144c:: with SMTP id p12mr25247778ilo.290.1625823576611; Fri, 09 Jul 2021 02:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625823576; cv=none; d=google.com; s=arc-20160816; b=pfwz5+y86jmF8WqGYuuv+OGJk2O0tfZVrjK0zO51DrhluABfUqA9YaqLHlKLjlq0Dk T2u0hYSD17C7aXoOGr8h4TDgT0OzkuYJEhE1XNW3tWT94VLXxIVE0G0Yjrn1w4QdMaF5 UChP/UaqSkXHfqXlczo4T17eemy4L81dEmm5X/oN+sUHtf5LiaQ6PI27jRvzgrjNmvuA 0ZmEl0YPWDCdF4HYPQGEdo+FWaeVYt9aBBqaV0HpBGLVSXldCMGZuXbTAA/WiPgMkYfS xBW7uShKXlnUB6wAJo8HAfEtPma4rCLiKIVMdcqrrP5kWuwapAo0jhTfYCS/TjGCS2sP /xXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YOgvxj3SWf4ayvWrKcMrESaR634CfcbvujatrlcPxNA=; b=STViV1CTaGQH9AgaaN5Agy8v2j3lRdqpEdWK+0p63Qrb+h9wrIUcqSVoqoJ9+sw3U+ BUYQhUa/S08CxL0ngIB+39VDohQmpoikx2BqtvOSZd5oTv2BRsYdxNDLBayoRj6dswXr Vw1mDPjkzHjg4k77sgsvl4V9A2/kfVBOszEmTYli8vtohYUFzefQgNVQ/Dy/ZuCjVfLa 92OnUATom41jkpikZ4S8dD+0IUEJwy/mBNB2GXYVfgBcnYfKI23GOWuesr3XhYuCm4wN 3JG4V0f/+uTZFrKcRRKAYFZ82NdzlaxLSiskY/T2qL95eis55h3P5bw9P8B+1TvlYhJ+ GBJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si5858165ilv.54.2021.07.09.02.39.24; Fri, 09 Jul 2021 02:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231877AbhGIJli (ORCPT + 99 others); Fri, 9 Jul 2021 05:41:38 -0400 Received: from outbound-smtp31.blacknight.com ([81.17.249.62]:35739 "EHLO outbound-smtp31.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhGIJli (ORCPT ); Fri, 9 Jul 2021 05:41:38 -0400 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp31.blacknight.com (Postfix) with ESMTPS id 22FF9C0B38 for ; Fri, 9 Jul 2021 10:38:54 +0100 (IST) Received: (qmail 412 invoked from network); 9 Jul 2021 09:38:53 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 9 Jul 2021 09:38:53 -0000 Date: Fri, 9 Jul 2021 10:38:52 +0100 From: Mel Gorman To: Yang Huan Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@vivo.com, Uladzislau Rezki Subject: Re: [PATCH] mm/vmalloc: try alloc_pages_bulk first to get order 0 pages fast Message-ID: <20210709093852.GY3840@techsingularity.net> References: <20210709092831.10602-1-link@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210709092831.10602-1-link@vivo.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 09, 2021 at 05:28:31PM +0800, Yang Huan wrote: > Vmalloc may offen get pages by loop invoke alloc_pags, this is > cost too much time in count watermark/cpuset or something. > Let's just try alloc by alloc_pages_bulk, if failed, fullback in > original path. > > With my own test, simulate loop alloc_page and alloc_pages_bulk_array, > get this: > size 1M 10M 20M 30 > normal 44 1278 3665 5581 > test 34 889 2167 3300 > optimize 22% 30% 40% 40% > And in my vmalloc top sort, zram/f2fs may alloc more than 20MB, so, > It's worth to use alloc_pages_bulk. > > Signed-off-by: Yang Huan Thanks. I suggest you take a look at the current merge window and check if anything additional needs to be done after the vmalloc bulk allocation by Uladzislau Rezki. -- Mel Gorman SUSE Labs