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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 D1641C433DB for ; Tue, 2 Feb 2021 10:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E64564DD1 for ; Tue, 2 Feb 2021 10:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbhBBKMq (ORCPT ); Tue, 2 Feb 2021 05:12:46 -0500 Received: from gentwo.org ([3.19.106.255]:45882 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbhBBKMk (ORCPT ); Tue, 2 Feb 2021 05:12:40 -0500 Received: by gentwo.org (Postfix, from userid 1002) id C01833F511; Tue, 2 Feb 2021 10:11:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id BDE3A3F13E; Tue, 2 Feb 2021 10:11:53 +0000 (UTC) Date: Tue, 2 Feb 2021 10:11:53 +0000 (UTC) From: Christoph Lameter X-X-Sender: cl@www.lameter.com To: Abel Wu cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , hewenliang4@huawei.com, wuyun.wu@huawei.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slub: embed __slab_alloc to its caller In-Reply-To: <20210202080515.2689-1-abel.w@icloud.com> Message-ID: References: <20210202080515.2689-1-abel.w@icloud.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Feb 2021, Abel Wu wrote: > Since slab_alloc_node() is the only caller of __slab_alloc(), embed > __slab_alloc() to its caller to save function call overhead. This > will also expand the caller's code block size a bit, but hackbench > tests on both host and guest didn't show a difference w/ or w/o > this patch. slab_alloc_node is an always_inline function. It is intentional that only the fast path was inlined and not the slow path.