From patchwork Wed Mar 6 18:24:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13584413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03651C54E41 for ; Wed, 6 Mar 2024 18:24:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D96A96B0083; Wed, 6 Mar 2024 13:24:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D20F16B0085; Wed, 6 Mar 2024 13:24:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4C486B0088; Wed, 6 Mar 2024 13:24:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 989996B0083 for ; Wed, 6 Mar 2024 13:24:54 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2F91116074C for ; Wed, 6 Mar 2024 18:24:54 +0000 (UTC) X-FDA: 81867440508.15.DDACD19 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf18.hostedemail.com (Postfix) with ESMTP id 47C581C0007 for ; Wed, 6 Mar 2024 18:24:52 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=KB3j2cgW; spf=pass (imf18.hostedemail.com: domain of 387ToZQYKCDYkmjWfTYggYdW.Ugedafmp-eecnSUc.gjY@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=387ToZQYKCDYkmjWfTYggYdW.Ugedafmp-eecnSUc.gjY@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709749492; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NeN+jv49ztz1DkBAYeWMzQyB4IxgpHbFtvet8rPjepw=; b=JKrjygA/URbnzpy5xn654UNpbHOdPal4Ag3WK0AYBwq1NTmMynXm9j3g7zSl1cAswRi7nH +QjnhP/46UhlXe2Tpa5nnZpDbnSd5KcVG2ITocXpLQbjqAumM5FAy9QVX9Ty2STiQL1EN2 5/6vJitaRQbJ5LkTfd6J7EMrWFAq9UI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709749492; a=rsa-sha256; cv=none; b=7TvhgJTpcuU6zXVv3XSO18we/PVpgo/YuY6wkMFfmCy5Ap+VkBGrqlQd6KwbJu4/icpRD5 p5y1g77cjSamBAS8gR/Zu/AIppLlyI4tLEATg8rU5u1yw+olC+8+Bgi4DGhmJJiMQhRFz1 9kutZBGoUgZNNf0gZxPaJ4qjQdHjvMw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=KB3j2cgW; spf=pass (imf18.hostedemail.com: domain of 387ToZQYKCDYkmjWfTYggYdW.Ugedafmp-eecnSUc.gjY@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=387ToZQYKCDYkmjWfTYggYdW.Ugedafmp-eecnSUc.gjY@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dccc49ef73eso12358149276.2 for ; Wed, 06 Mar 2024 10:24:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709749491; x=1710354291; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=NeN+jv49ztz1DkBAYeWMzQyB4IxgpHbFtvet8rPjepw=; b=KB3j2cgWHeaHxAoXgscKQgNE4MySRD441SU/HFnBvhpriW+uCkzortazp0xZgCBGBS AZZOsbxbujVfsdUZ3WWgM7szyAv4RU4H6DzLoO4GIYloImAthp2mpirmV2COKAFZA4Fb SpUlbaNJ218FKPKp6Gk9GjVJrLa7AX6t1RotH88YQW+qrS1XjpaKgGlllGQhNtFFUPuU XynGWePwWKo/YeQQp/ewdId1qUEMW6QlDIEratVZDljPr7WLZ3mYX3PpJDXoXkTK6Vbh 99Cq6jFcFDc5xPt79ZCVySncxYpeKeOHOOT0oxC+AjpD6JMF6gClHDey6LZh3nL/RNga BUFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709749491; x=1710354291; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NeN+jv49ztz1DkBAYeWMzQyB4IxgpHbFtvet8rPjepw=; b=NCi8X12YHvmDXGV1LydarWB31ONCl9wDTrkK/L2kN2CoY/Iy5xutd3ZfaI15H0YVDN SsOurOl6ZwvJBjbEqwMYezuVnRWuroEsHYFndMsRoNw5MOO67n3Bv0S5/Usnwf1tkYAK gey0/4lejy77HVduVxTohyG08HimNLrmNomrluRTTqVkx4FhAgCbNMJcbSI3SncnciEg 0A+CFxI+7D7PA1ZGs75YqM0gxc88dW4G7kUSKNNvCHKFyCnSKLJ7M/fvHwBFMQlFcbuv PjAbRde4m2FrbheVVMK9bVjxycggBxGJc5zQ+PLehyUJfxHZefX94qhk1gOz/19OAibe 0X2g== X-Forwarded-Encrypted: i=1; AJvYcCWAy+4nmCfVqdZH1Xlfasz//LkM5fh/YfN0JW9xAgJja5pwVa9Kl6EpLLVix00w4aXrWak6+iboRusMoHdEG9JOhE8= X-Gm-Message-State: AOJu0Yz+oe/Z0gPDAB99SCURRvKL/D2NcsnNEQVOYtVbf2CGJbTqFobj Hl9bm0d5a1j17FwBALbGbOGF33BBFUlmOJaawFu5eqmv7HFx0wZbq1qACA8TPlWQaB9ElmrEPno HDA== X-Google-Smtp-Source: AGHT+IEhO5aEi5nmrgTX3yTDU5CUyz1hSmpU3f2fCr4To3c82DT/ejxK9TArxLseWogn2XsiLsKy5eHr87g= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:85f0:e3db:db05:85e2]) (user=surenb job=sendgmr) by 2002:a05:6902:f0d:b0:dcd:4286:4498 with SMTP id et13-20020a0569020f0d00b00dcd42864498mr559510ybb.6.1709749491385; Wed, 06 Mar 2024 10:24:51 -0800 (PST) Date: Wed, 6 Mar 2024 10:24:01 -0800 In-Reply-To: <20240306182440.2003814-1-surenb@google.com> Mime-Version: 1.0 References: <20240306182440.2003814-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240306182440.2003814-4-surenb@google.com> Subject: [PATCH v5 03/37] mm/slub: Mark slab_free_freelist_hook() __always_inline From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org X-Stat-Signature: buub513t7ypag96f6rg8w4148wttxuzd X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 47C581C0007 X-Rspam-User: X-HE-Tag: 1709749492-516283 X-HE-Meta: U2FsdGVkX1+2+F0CqrbSzZpZjCB0b2APnTxA6kxe/9pDABgLV1azdAWbZ/4jwvrE+1Ms0warn4HYImncR5+8kpHe5Y3qMA2WcE+WL5LP+/JkTYu82JUS7ODHtCxUyeOfMshCpWtosRbdEg5NzeSzByrXCc7/8CJrqdUZSTPKTb26YQkOpy29uo55hEtW9CLGf9VBV/ebLYn/KQlY+lCaPoTHLSDrbk6gJAMZzUO5AvqoDO7kAPHwY6UwoFIQo8EW2Ofa316fmvl2aAdv7wQJyNkXpevjew+t1FJ8eF1Whtao1HDBEbAjOkTVfRjepJ0wa2nJZ0t/hgj1Mx3uJSnbIpBBpl40PyDr5adKkQC2wNlXcfVEGIzKZ2R7iyWVSnlkSJSBdUnEH+iBadaiyg3XiCzhl7m/G0jXCVgfxTiLfioobdCofGd0MLQNQjtjPcC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wKZe7th3Pto8YJhNEYyHf5xEslkX2I92YlJeaMhZxl1efFYVL+Z1WjwwtX30JAFXFyANy8KLPOAOqQq1DrQxkNNB14OCZC/9ByD9vE4vZl8eVaMBLwz+sjtpCIAr91JQuDAFlw6/8/BAKuh6zm9Jt5vAVr/L150e5VaLOxbruHCddwVkHzERAiKwzgL6H7RbAaMi4M4ZefIuODTEg0VOIM56SyvZySAwr+R1hdzOJR6387vOA9HCqX67bWP7MYssnO5bLoJ7zNn3Dov8S2FwP3Q81Q8YaZhmm3cYdfYk075Q4/FJmxwNO6pY9M2vcRw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Kent Overstreet It seems we need to be more forceful with the compiler on this one. This is done for performance reasons only. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan Reviewed-by: Kees Cook Reviewed-by: Pasha Tatashin Reviewed-by: Vlastimil Babka --- mm/slub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 2ef88bbf56a3..0f3369f6188b 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2121,9 +2121,9 @@ bool slab_free_hook(struct kmem_cache *s, void *x, bool init) return !kasan_slab_free(s, x, init); } -static inline bool slab_free_freelist_hook(struct kmem_cache *s, - void **head, void **tail, - int *cnt) +static __fastpath_inline +bool slab_free_freelist_hook(struct kmem_cache *s, void **head, void **tail, + int *cnt) { void *object;