Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1402221rbb; Mon, 26 Feb 2024 08:10:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUdp8X2aKACDwZnNeciCG7Vq/kz8pfaE2eNowuRsQzTeTXsxslVuSJnvz36+/IzD4Gl3g+Ga7wSeyIqb5TdUV+juberCFni24I5YiL8PQ== X-Google-Smtp-Source: AGHT+IEc+70XkDOTzg0GXaL5mD09sMCz0byZ7AAy0oY+Az35y6DzItlC0NDoMB9nM8NUZQ7SRKjI X-Received: by 2002:ac2:46e4:0:b0:512:f5a7:de27 with SMTP id q4-20020ac246e4000000b00512f5a7de27mr3397481lfo.46.1708963832781; Mon, 26 Feb 2024 08:10:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708963832; cv=pass; d=google.com; s=arc-20160816; b=uIvdJkxzQL/Yv2uUXaRiq5f8SAHixP1sFf1eQHlZSALFRwZfHTJlDcCNi10zalxBa7 PE/DtGJckV23DTo+fcPCiJ6/FsjagqxSH5PuBNxcAkPN0E2wxEGqYFtrtTNoL26Nly10 Xm5jPJ4qnaFoocQ28QIFqEaJ79dfagwoC/zdTRkYXaY7kG2WlIl/uI/d90LVYMFXBPgc 5Ew6xAn10KkntOPUhv1bDB5eptzmddr4NzQt7IAH3SHmEBGA4tCZKWUfTEf5TsPByT+t kHn2SNB2IfnFw0u8VJwYXN9ASfHrX4cnWyiwkiw/3lgFrkAWxC7psiVhhlvw4vuTf+IA lKeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Q2i9nu0Yj7jZAbH4EMUTPvr2EXed0SrW18ZEoR5sBFQ=; fh=MTrv8P7lr6CSM+t8ho88uEJ0BSStdHvJN/djjhtoRoY=; b=SB1Rq6EYMVGDgDdaH+4XTf2OdoOiFyGBq48jSCk2xkcox/AqO7NYp5n9eIi2D4ho5i /6rys9mJcWY9hYyj1W6+52S8rqPji3+Lw7w82h9E9ycfoNMyE4N0TtAYzCC+0ZM2c8Wx cnsNQ00F9NbvngXJSqaXygAo32ThcV4frniklG2VPh1rmBTRCev+xV1XD0IvVI9Hvqll CSghbx4s5B9JVxTIWuKD6guswLU2hvdJiD+QBTPKvq91tCArnJtSFiZN6+ItZSyFjEG6 /jO14AD3NpdE9tKI/viWsmldr63X4Q62ZX++RpBIsMwid1gJVfSOoz7IssRksZdbCX17 rtCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=IeKh5YG0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-81871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81871-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x41-20020a50baac000000b005646e5ae24csi2092355ede.429.2024.02.26.08.10.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=IeKh5YG0; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-81871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81871-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 54E671F2D448 for ; Mon, 26 Feb 2024 16:10:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEF8812CD86; Mon, 26 Feb 2024 16:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IeKh5YG0" Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (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 18BBF12C55B for ; Mon, 26 Feb 2024 16:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708963797; cv=none; b=qpDDoMrTM05rCN6NOJqAUpYCdlvw2GzRtQNm1eBT+s5Rpd7qEpQJ+F1VsX/7dH/pLeke02nC2nxFZEHycP1L4IMUkMB8hsN5hVNCeq88+5xQnp6esg5w3zxhpGzFzAXrSTnV+ZP6hp3CEG1q5FGDpZNeYTwgfkNg0p9ypl4P7q4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708963797; c=relaxed/simple; bh=PG9T0E4ZcsWjvdpfHUOgdfPJ9G3s6+OiDx3FL9PDAwM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=hR/VNDTjag5NY3xfnzRb66cr0Jg1Tbhtd1lZLOkQRiAy62d8l6EqOZxAREMiu4BPflEqBZmY4TXyB8ElJ/Fz4XLwXHwDV99GXeo9qtqhLl+5zc5QpP1Ga9tQBBicArYKJzUH1uJtSTYEuNlQcUd+NVHD/43xcP3irD6CraNdYLg= 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=IeKh5YG0; arc=none smtp.client-ip=209.85.219.170 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-f170.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso3599471276.2 for ; Mon, 26 Feb 2024 08:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708963794; x=1709568594; 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=Q2i9nu0Yj7jZAbH4EMUTPvr2EXed0SrW18ZEoR5sBFQ=; b=IeKh5YG0zG4QERv9OQmrbe53HbIMQJBWFJgDUjkuYrDQu3Pqoo6CI9Ih3XSXBvEnYs 0FEGEwMRrfRUvaAqMDAi/A8z4Y3x/vBes2nRxkZ9ZuWyrxEC+GHUKsGZLm5IEz8DgH1x XeIgBHkciWSrGcb9Vmcf9M6/9K9hTpMXbb32I9TORsVFJU0kNzJIdkwsDzTTmaLdnunU /wFIrevrF6GtW65Kub+qU5kr0EIuZpFUePKPgI3XdDimaO24aLTLTn6ILiYicTP2tzvb vgbOELcE6WdrW1nnzBu2zFr5XymqaZziUszPvM2TvaD2YJKWnaJV9+0jVipbTWxKg+nT pQWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708963794; x=1709568594; 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=Q2i9nu0Yj7jZAbH4EMUTPvr2EXed0SrW18ZEoR5sBFQ=; b=if60bdOGeIaypVqIeeH3dVGxC4LXl0b10ggbdrsV/R7Kz9Xo0pL6QmcukEuyXVSoWc 5XRForJwF87u+1EOv+2jvQ2fa8LXOYXM2rLzk3M2pSl/JM++JWbEiAJHJeMx3VyReCpr Ce0yaWXeZ5yMMGJclchQhkkY2pY+J3eEzpOBw+Knk6uXas2aSZ0yQoNsGMwwnmkXW6FL G4NVIFtw9a05DzV9P/dooHyM930OtXMKJtegMQ5+JqiKNqWS/v3cxhlH3kcsn5sRDuWQ p8SkjGMnGhoNT7h8b9mY7bMdTW262bmulD2b1PBSZl+sKui5/kQDmCzrpl9K6kP0s1sX 8mrQ== X-Forwarded-Encrypted: i=1; AJvYcCUC9uaXBVvKjdM6pH9rrrkkzVEDQhnqvVtLML+QdmQeL6HCAZ9tZYcYKfbog2Yjpk38Ai4Xh4dsfQGvL9WWMa5x9PeMpI/BiVYsP0gd X-Gm-Message-State: AOJu0Yzl60D09TQVgwOztnn8l02/da4R/VRsVNW5NZIczvuMSRnqwyo4 hnu9N4WqTM41F1hX7YENFSTS6Vhzc21CKoqT9SyA8zqxCX4vbaxggAV3NNZjRoPiw8Dpaau2Z6W ls3C9n8RsAjrc4QfQWc17QhhWXOAGhgc9dLC0 X-Received: by 2002:a25:ef4a:0:b0:dcd:3575:db79 with SMTP id w10-20020a25ef4a000000b00dcd3575db79mr4289171ybm.6.1708963793723; Mon, 26 Feb 2024 08:09:53 -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: Mon, 26 Feb 2024 08:09:40 -0800 Message-ID: Subject: Re: [PATCH v4 03/36] mm/slub: Mark slab_free_freelist_hook() __always_inline To: Pasha Tatashin Cc: Vlastimil Babka , Andrew Morton , Kent Overstreet , Michal Hocko , Johannes Weiner , Roman Gushchin , Mel Gorman , dave@stgolabs.net, Matthew Wilcox , "Liam R. Howlett" , Tetsuo Handa , Jonathan Corbet , void@manifault.com, Peter Zijlstra , Juri Lelli , Catalin Marinas , Will Deacon , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Peter Xu , David Hildenbrand , Jens Axboe , mcgrof@kernel.org, Masahiro Yamada , Nathan Chancellor , dennis@kernel.org, Tejun Heo , Muchun Song , Mike Rapoport , paulmck@kernel.org, Yosry Ahmed , Yu Zhao , dhowells@redhat.com, Hugh Dickins , andreyknvl@gmail.com, Kees Cook , ndesaulniers@google.com, vvvvvv@google.com, Greg Kroah-Hartman , ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, Steven Rostedt , bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, Christoph Lameter , Pekka Enberg , Joonsoo Kim , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Alexander Potapenko , elver@google.com, dvyukov@google.com, Shakeel Butt , Muchun Song , jbaron@akamai.com, David Rientjes , minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, Linux Doc Mailing List , LKML , iommu@lists.linux.dev, "open list:GENERIC INCLUDE/ASM HEADER FILES" , linux-fsdevel , linux-mm , 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 Mon, Feb 26, 2024 at 7:21=E2=80=AFAM Pasha Tatashin wrote: > > > > On Mon, Feb 26, 2024, 9:31=E2=80=AFAM Vlastimil Babka wr= ote: >> >> On 2/24/24 03:02, Suren Baghdasaryan wrote: >> > 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, voi= d *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_ca= che *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. > > > For consistency __fastpath_inline makes more sense, but I am ok with or w= ithout this change. Ok, I'll update in the next revision. Thanks! > > Reviewed-by: Pasha Tatashin > >> >> It would have been more future-proof and self-documenting. But I don't i= nsist. >> >> Reviewed-by: Vlastimil Babka >> >> >> >> >> > void **head, void **tail= , >> >> > int *cnt) >> >> > { >> >> > -- >> >> > 2.44.0.rc0.258.g7320e95886-goog >> >> > >>