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 X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A03ACC07E9B for ; Fri, 9 Jul 2021 09:38:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 298FA613D9 for ; Fri, 9 Jul 2021 09:38:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 298FA613D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F0E7E6B0071; Fri, 9 Jul 2021 05:38:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EBE4F6B0072; Fri, 9 Jul 2021 05:38:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D85E56B0073; Fri, 9 Jul 2021 05:38:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id B22566B0071 for ; Fri, 9 Jul 2021 05:38:56 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EA626274C0 for ; Fri, 9 Jul 2021 09:38:55 +0000 (UTC) X-FDA: 78342550230.34.10D6AC6 Received: from outbound-smtp57.blacknight.com (outbound-smtp57.blacknight.com [46.22.136.241]) by imf09.hostedemail.com (Postfix) with ESMTP id 81E053000108 for ; Fri, 9 Jul 2021 09:38:55 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp57.blacknight.com (Postfix) with ESMTPS id 2032FFB363 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) X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 81E053000108 X-Stat-Signature: gd755qt3hweb31zxqqjaikrys1b37h3m Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf09.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.241 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-HE-Tag: 1625823535-178165 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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