Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp197952rbb; Fri, 23 Feb 2024 18:02:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUrwg3B/SNFJocjl7gjd13/FUHPd+DlQ4+Hk8B6CSc8G64RPhREB1NAlLyyXF3nUmplmGY4qE59MxwUnuO5LdgTmTNt3/FITDpaqbyA3Q== X-Google-Smtp-Source: AGHT+IG39mW4BZfZDsrAJ9dpoY8l62Hbch+VdWJRLpveaZ4wHkooxRyVbMIWbjuc0DtnzaA73dza X-Received: by 2002:a81:ac56:0:b0:5ff:7cdc:404b with SMTP id z22-20020a81ac56000000b005ff7cdc404bmr1433322ywj.52.1708740167738; Fri, 23 Feb 2024 18:02:47 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wl14-20020a05620a57ce00b00787b118c401si209649qkn.96.2024.02.23.18.02.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 18:02:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20230601 header.b=YClsuH4q; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-79433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7D32A1C25183 for ; Sat, 24 Feb 2024 02:02:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C330DF6C; Sat, 24 Feb 2024 02:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="YClsuH4q" Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 051688BEA for ; Sat, 24 Feb 2024 02:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708740158; cv=none; b=ObrDeaG0TwG1Mq6P/tZqwkq5c8J6pAhYbaJDvyq3TLO9m5U/66MZCm1+uRfmy/+EiOs7SAEYU3dvZXu2DOlIr0L4utwkXougbHhtuLr1FiAyUOvsLvliDSXt4dD99urXMLQH20TGhtXq1MjKaXbPO2aJl/8I7HGVq+gC8ecze4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708740158; c=relaxed/simple; bh=aU9FbwN1S9//HRHbhdmeF+fyYNkS7K9J/zpvYfRP3hA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ENK5JuIX0LghoRCQ+7VHT97yi5TxbOXybbW6Hu0hOa45JsvFwP1Aa6X1fb1bfL+tDV6hZ48u76wpHh3r0f/ysqDn1EM1tqJ7SfI/ge9sBmoP/xKVyYh23qCpN44Xd1v6AN17BK4kjJIwHoqklrO35r2zzxMCb6aO2ecGiPje5AY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YClsuH4q; arc=none smtp.client-ip=209.85.219.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yb1-f173.google.com with SMTP id 3f1490d57ef6-dcc73148611so1567535276.3 for ; Fri, 23 Feb 2024 18:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708740156; x=1709344956; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9PYgxetUjHOrEBE3OyfXnw/V4oH+FzaVrAptzS8yqHg=; b=YClsuH4qi+9Hbah7mEVNCxqPVcCh1T8fgiGQbuJcRakQfLjheg2rmtv16S3OI6V4sQ nlaUliNA1qA63z6vOZ6V7JomJp43uouyQOdEgd2pkPDnyJDjRgZcN66pvWp2GruffhWc CIBRI1tO6ZfFH2Z60sHRNNqlE06wOVp9jAkvkKMlc9QY2DSOKmGD75kn7V2D5MAg4Jia fausVUyE1OVR7gE3WJ1wOZM6I1dbiS3GSUPM0S3Ap+vHIhOrkHl16fOaXSGmE5XfDxg+ +MYYpw01Ar1XB+euQdjKPPl7Xfo62jG9xoAT4Tn9iqq81a8td3y9txJl6eLlnqiy+wlz 8DKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708740156; x=1709344956; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9PYgxetUjHOrEBE3OyfXnw/V4oH+FzaVrAptzS8yqHg=; b=ApDUFHLVoJQzlL8YpgK/y8JxLm+e2zK1Z7g94Xq9HtP/GaaqwQf0obpod6iW7UIZqa 4dSysApu16a5Fdf3DyBvd+24aqzoadimiqHKqAcWYhvQ/F/2zhQlWwYxVmcUcV8k4qi3 x22MJrexQqixk740+wooVaOlLlvKIiLehpL258D1QItnpMzYWBw8pFYNEtIux3h86kNG QWsONNK8wGaoQLebtOPSaCEK8Gg1gd2FLGJr57oog8kNEnJIHZTJSREpE+bVwu0rgHCu KwUrwlkp3metSjFoFG2jCK6gwfG48tJ6QlQPK3KWqbIAZrF63kbxfiZa9xHiIoMJBTbL hRtg== X-Forwarded-Encrypted: i=1; AJvYcCV+EKtJDuUR8ZAt0grPCPdNl5nu9uy4UpCaYxUmD6wfXQkUhlzYzR1oOJFKM9drPfta76Z+yrXJiGNG1r3kgG+kpzPyeib/v+0g3Mel X-Gm-Message-State: AOJu0YwD5EEvmrwrZmlGb4dLxPnTY6jbOAMp4hLI2UClwHKTtorYTO4w Cv4v5FtgRw5FF9KOD/JPpJ/pB/ujngyjIedsoqqlbHRGDE7Aabi5qfU5YpSaZlRW/EqXZWuqRqX qgak4HihGMbHJryeh8+Z6dWShJ4CrzLkwwUJg X-Received: by 2002:a25:9986:0:b0:dc7:4758:7802 with SMTP id p6-20020a259986000000b00dc747587802mr1258940ybo.48.1708740155772; Fri, 23 Feb 2024 18:02:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240221194052.927623-1-surenb@google.com> <20240221194052.927623-4-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Fri, 23 Feb 2024 18:02:24 -0800 Message-ID: Subject: Re: [PATCH v4 03/36] mm/slub: Mark slab_free_freelist_hook() __always_inline To: Pasha Tatashin Cc: akpm@linux-foundation.org, 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, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, 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, rientjes@google.com, minchan@google.com, kaleshsingh@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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 21, 2024 at 1:16=E2=80=AFPM Pasha Tatashin wrote: > > On Wed, Feb 21, 2024 at 2:41=E2=80=AFPM Suren Baghdasaryan wrote: > > > > 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 > > --- > > mm/slub.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/slub.c b/mm/slub.c > > index 2ef88bbf56a3..d31b03a8d9d5 100644 > > --- a/mm/slub.c > > +++ b/mm/slub.c > > @@ -2121,7 +2121,7 @@ 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, > > +static __always_inline bool slab_free_freelist_hook(struct kmem_cache = *s, > > __fastpath_inline seems to me more appropriate here. It prioritizes > memory vs performance. Hmm. AFAIKT this function is used only in one place and we do not add any additional users, so I don't think changing to __fastpath_inline here would gain us anything. > > > void **head, void **tail, > > int *cnt) > > { > > -- > > 2.44.0.rc0.258.g7320e95886-goog > >