Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1777259rdb; Mon, 9 Oct 2023 02:33:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwATDEYmCOYsq0K8U+g4HHbJ/ZUOTCEYA7TVNB/GA8aY1N8v5uO33+nR/mfAvPM8aTUJxP X-Received: by 2002:a05:6870:3c07:b0:1e5:6286:e513 with SMTP id gk7-20020a0568703c0700b001e56286e513mr11352654oab.8.1696843994039; Mon, 09 Oct 2023 02:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696843994; cv=none; d=google.com; s=arc-20160816; b=TbA+CvcVNdlupKgr7hm/r15mpBmshdiGnVgZq1rtUIYxWQeXvxsDnko7N/3ovnYgIG eR7AaCF6nSIxl7fxHjuju9umXTMde5AeqcrSqAhCWnXs9KmtHNy/PEe48iOqm9ZYUBEM +kuEzTL/ODgXfddbzMb6GPHdF+Rt17i+inP0knyGgriEr5gFcFTIVbbJ9y9vT6U9dy64 hKNd3bqkOtpp8qtOGNpaqF1Eyg9+ytFeYhdFD1irruSnovPWwb5qkSToq4wWOGxltDbD T+Pt8L4sYEyPs+nIQvaFgTfgpMc1kspzoh5LmLfuRiUh0SUVnnpDg9oRHyD3WJfrfQ+k LpBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Fc2DaCMixY7eiqSJldB8Emg0r+LnGTFB1CXp+Shw46Y=; fh=D7uhrQnmQG6xf11gbvfi3iQ1A4p/6GZN4OQA8frEvwo=; b=fX/iz/B85yTGbrOP+9DEylThKnsfT4PzphaaHnBvnpx2Gs8eAmSIGftfQMjhnM6Ntw /BiC2DwKUBb9hgk464yX+EZ+N4mcI+3z5FbY0D5yjARxJLnB+IEfGd+DhsDdwY3hH+Kp uO/Z5WOS6u0JG0DY5t8/ZLjWD7XQpLCmtKOYYIeV1bUG6jFTr4+u9p4xcuVhhjx2Ol2E W7fvKD6VOpRwRq2e4h2bSIHZtWkBjbWQjJKIsXiCJgus34yARCvsfifZBgk8wWyu/BDi Sn1OTkNbByggq3viTL2Dc8aE8OLLCzq+hRwn4c4Jw2J1Bsq+8mQGUtn25cERIXChs7Yz xwMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZkUHVoP2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id k4-20020a056a00134400b00690d695b113si7423416pfu.337.2023.10.09.02.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 02:33:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZkUHVoP2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 81D8080A97E0; Mon, 9 Oct 2023 02:33:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345728AbjJIJdF (ORCPT + 99 others); Mon, 9 Oct 2023 05:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345449AbjJIJdE (ORCPT ); Mon, 9 Oct 2023 05:33:04 -0400 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D59C794 for ; Mon, 9 Oct 2023 02:33:02 -0700 (PDT) Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-65d0da28fa8so26801956d6.0 for ; Mon, 09 Oct 2023 02:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696843982; x=1697448782; 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=Fc2DaCMixY7eiqSJldB8Emg0r+LnGTFB1CXp+Shw46Y=; b=ZkUHVoP25SnWGu2A1PrgyFt7gg2cP9COV67toW1tUQFnmBga2xUMY8Kinxu2vUR54Z Jzjvpvd0sCuqwHzERslJAxIi1p0HWNBwfcP4gGW3qIFYr8eOc6Du0FAQ/pfpHRRg7w4s IHD9Knm+JY8oStciKoVM0Zm+1XXFdSdKoAUPVmAnLHSKWMTt9j0nYMgI6FUOAbHmEiay PW460qcNvCNwUB2qcnOPqHFGke0LawuSy2pDim645CRg1XBiOTkCmXPYGkX0f+HE1FHj bZv56K0nfo94hjLt40oK68nckQj4UWxvflIO6hSU+Vazjz5bOq6OtCXEwlZgQgx3qCIX L7uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696843982; x=1697448782; 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=Fc2DaCMixY7eiqSJldB8Emg0r+LnGTFB1CXp+Shw46Y=; b=FM8idtfm0CuCsLIfiGXYyK81eUHNGB/fu7thH8u7J0re5SeFj3Xfm0TQyCpv3/BNVK qAy+nyaGQaR9EMd0YqSiZoFv1aPHBptsVZvAxrrTNKSWaax7+sBQ5B46bobHx9ezQcmM +MlrUMN6tpI/p2HMNlhm2hmMVGE32E5iksDv+5/SWJG2rc/mrqbjbLqtJfQV+EMoIuty 9bkqlnC73wRb+vhhaqjBgrcMDMVIw+QtwtsyDDNgWWciMiJbNqYsbtHTqoVYb6/ra7VH +uPcXHTJ8MZY1Gu0yOoJU7U9v9skI1r0wC0ON3e1HTHwSYRkqaHIub08sTfJitymUZ5l 7QOA== X-Gm-Message-State: AOJu0YyBQnOgLbkenZ1i65pZG8vuGmhVkIrElhKEZ0+6OG/0vfGcRdcj yb0n+ZPljExTkuQv72GHpvRh6o8OQJ7mqvKoO2MwlQ== X-Received: by 2002:a0c:8f0a:0:b0:656:3352:832f with SMTP id z10-20020a0c8f0a000000b006563352832fmr14547557qvd.32.1696843981887; Mon, 09 Oct 2023 02:33:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Potapenko Date: Mon, 9 Oct 2023 11:32:21 +0200 Message-ID: Subject: Re: [PATCH v2 10/19] lib/stackdepot: store free stack records in a freelist To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 02:33:11 -0700 (PDT) On Wed, Sep 13, 2023 at 7:15=E2=80=AFPM wrote: > > From: Andrey Konovalov > > Instead of using the global pool_offset variable to find a free slot > when storing a new stack record, mainlain a freelist of free slots > within the allocated stack pools. > > A global next_stack variable is used as the head of the freelist, and > the next field in the stack_record struct is reused as freelist link > (when the record is not in the freelist, this field is used as a link > in the hash table). > > This is preparatory patch for implementing the eviction of stack records > from the stack depot. > > Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko