Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp174988pxb; Tue, 2 Feb 2021 02:14:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTpNh2HL/DxsrI5WgIvKbLVXaIx2DPZA2o32NXC7o2janP1A6zSjE3+yzFdWFxi9K6rju0 X-Received: by 2002:a17:906:bcd4:: with SMTP id lw20mr8895058ejb.415.1612260841756; Tue, 02 Feb 2021 02:14:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612260841; cv=none; d=google.com; s=arc-20160816; b=puscN4tg4bjz9LEWtMXXXQIYTZpoYb5FOKeYuMpxTZneMCAvch7GrkNv/0PQ9BcIi6 GXWU4ZCtuiQu1SyizwqP5v7l00nb5z4EtcUzrfDZxTuzSt+bN4WJxGKNisrRCKIkhkFR eKZ0WcehZw/JcON6NZLKKVs0sBpR0mdejRZOHxfeUCFBT+sk8ctfzJpLPk00TeNwonWv sR0nI+qTlAKH+na6ZwQNBJVTIpr/Ie7sliN2VZmzfcn5Nvl3XeYguXjc8PHfnp2NmsMD JXjRIf97Vp7Nj19D8QDoH7dGpbUpFNAXSpM4BElFNQpcc4+o0XsMpa0bdEyadKH6ntab dp/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=kuhZut7vZSR3fUwVToZCHMQ/5HZlE8gXlQyau08Q3G0=; b=IyeOcnWVFeK5vT6oL7a91PU+qJftNJUfa0yafR9OczGKQnB+pPTuzNstS2MEOnA9xO yIyAHYeOOao18rheS1jbK1d++/D+3uxtuo7D58Y5LcoipF/T9Pzifw4JmoDqRWcsixpv VXtNZZz0SAEM0dMrW3bBEN8WXimv9+auE4w+kj33UoB/egADYDRdnzfKyVxbiQzddXB9 IhBpEEh32EfBNwk0hUP4cSOQITjMNRxWsFjcWy5tq9K/Gg4zJwo2hNdVLi1J1isMt5sy H3U8+Tru3EQQQ7gsJWABrWIu2+tfGtDijgA5WPOlE9/kDEDYspgfCsv/xtJrd9iDDAik Ue4w== 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 v8si2282349ejq.163.2021.02.02.02.13.36; Tue, 02 Feb 2021 02:14:01 -0800 (PST) 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 S229778AbhBBKMm (ORCPT + 99 others); Tue, 2 Feb 2021 05:12:42 -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.