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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 5A919C433ED for ; Mon, 12 Apr 2021 10:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2747361241 for ; Mon, 12 Apr 2021 10:59:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239812AbhDLK77 (ORCPT ); Mon, 12 Apr 2021 06:59:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:52494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238530AbhDLK76 (ORCPT ); Mon, 12 Apr 2021 06:59:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1B690AEFE; Mon, 12 Apr 2021 10:59:39 +0000 (UTC) Subject: Re: [PATCH 5/9] mm/page_alloc: inline __rmqueue_pcplist To: Mel Gorman , Andrew Morton Cc: Chuck Lever , Jesper Dangaard Brouer , Christoph Hellwig , Alexander Duyck , Matthew Wilcox , Ilias Apalodimas , LKML , Linux-Net , Linux-MM , Linux-NFS References: <20210325114228.27719-1-mgorman@techsingularity.net> <20210325114228.27719-6-mgorman@techsingularity.net> From: Vlastimil Babka Message-ID: Date: Mon, 12 Apr 2021 12:59:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210325114228.27719-6-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/21 12:42 PM, Mel Gorman wrote: > From: Jesper Dangaard Brouer > > When __alloc_pages_bulk() got introduced two callers of __rmqueue_pcplist > exist and the compiler chooses to not inline this function. > > ./scripts/bloat-o-meter vmlinux-before vmlinux-inline__rmqueue_pcplist > add/remove: 0/1 grow/shrink: 2/0 up/down: 164/-125 (39) > Function old new delta > rmqueue 2197 2296 +99 > __alloc_pages_bulk 1921 1986 +65 > __rmqueue_pcplist 125 - -125 > Total: Before=19374127, After=19374166, chg +0.00% > > modprobe page_bench04_bulk loops=$((10**7)) > > Type:time_bulk_page_alloc_free_array > - Per elem: 106 cycles(tsc) 29.595 ns (step:64) > - (measurement period time:0.295955434 sec time_interval:295955434) > - (invoke count:10000000 tsc_interval:1065447105) > > Before: > - Per elem: 110 cycles(tsc) 30.633 ns (step:64) > > Signed-off-by: Jesper Dangaard Brouer > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/page_alloc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 1ec18121268b..d900e92884b2 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3415,7 +3415,8 @@ static inline void zone_statistics(struct zone *preferred_zone, struct zone *z) > } > > /* Remove page from the per-cpu list, caller must protect the list */ > -static struct page *__rmqueue_pcplist(struct zone *zone, int migratetype, > +static inline > +struct page *__rmqueue_pcplist(struct zone *zone, int migratetype, > unsigned int alloc_flags, > struct per_cpu_pages *pcp, > struct list_head *list) >