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 43ED2C07E99 for ; Fri, 9 Jul 2021 09:38:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1665C61107 for ; Fri, 9 Jul 2021 09:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231938AbhGIJlj (ORCPT ); Fri, 9 Jul 2021 05:41:39 -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