Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1330824rda; Mon, 23 Oct 2023 09:16:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpnYZogtmtaWZh0MiobfRUm3BR9UQ4FjZGyEaU60nDdv2oIY2vtfyf6pCtcFX8UfgL5Gqo X-Received: by 2002:a05:6e02:14c4:b0:34d:ea35:842b with SMTP id o4-20020a056e0214c400b0034dea35842bmr9227606ilk.27.1698077819239; Mon, 23 Oct 2023 09:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698077819; cv=none; d=google.com; s=arc-20160816; b=WlUqYArxHwKtqkmfAun/jDikFI8UuEthBKj2snIK810akvGACnvZRV0YQNh4i8xzM/ 0XgZlRqz5yGXrzFg3FCjTl/pTpMtPGyNuvDv5Q5qtOeSk+umt9nLoTcBie/V+05GhFor AlNsoiESMYiEAGuEfqyqgk+OJS/vyD2eO1VSYFAGDVSRvOgwFO8TCUPzm4JR0U5QACiT FppA1fiTcGvCFYN2h9n+ivxBiM8rgbO+roz49tx6LUSDJSqOkq/8CqRgfXoEHF/3KABU yG64NWB+/k96LnxltqJo2jRoZigpNHarkPrHjAdjFejXOt9NShBzZSklRrZ+PJeaaS3E ZO+w== 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=HgO08PRy6IyNU2zj7g2IPBwXTxM3jF14s2Iin9hZx7o=; fh=ClZrlmqypC8gyPFrg/phNYXzlKrWLi1ezKQD4pdvko4=; b=Wp9AjKtAZSJHNvodElfPxEUtCQVm3dK7hCzIS3FQcaWQMutykLqApEVudKBVqiUNHZ MfroT1ZMH9F44HhdZN0fINQTgzgeudxRbDmDe/Ao3mkCeQzcq4TGYAAMFXjjGnR9x9qh t94p4PEoIYlirKi3fOegZSBT7Feve+VIKoo9zeJdETsAN4j35HiR8hjK+QA74Bb/90+8 xXdso6yNYdjm8D5WufIYrWkcuni0d7UC7mc/KXHiyvnQDKreEiUQoogac9cYJg3UGIUM de2fpb2KJ7JAFaJCzxw1IXovMUlY5vm9U34IXoUBobSFQqToedsshIGRwzPIsVFWrQiI 7dcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TWO10BX8; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id k2-20020a633d02000000b0057d7cff25b8si6679524pga.198.2023.10.23.09.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:16:59 -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=@gmail.com header.s=20230601 header.b=TWO10BX8; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DF5F88094749; Mon, 23 Oct 2023 09:16:55 -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 S233564AbjJWQQs (ORCPT + 99 others); Mon, 23 Oct 2023 12:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbjJWQQq (ORCPT ); Mon, 23 Oct 2023 12:16:46 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10989110 for ; Mon, 23 Oct 2023 09:16:45 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-27d3c886671so3008733a91.3 for ; Mon, 23 Oct 2023 09:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698077804; x=1698682604; 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=HgO08PRy6IyNU2zj7g2IPBwXTxM3jF14s2Iin9hZx7o=; b=TWO10BX8fal2h2C4AcHEq8pw5BoMGvrFJvVAOac20KBLU5mIXadL2iSpeLcPYXyuAY BeQSc1/QKn0ONgIUUWkHjk8xniwkD388RMCbUj6MqsbB/z0oHgw6vppl4AkLYIGCnzLB 7YSt31Kqxe2V/TRcPn5J9oHEUV8Rm5orX0yDOxrMf1iUmpnaF6xacx2dVRnt8NsaO2B9 eNA3fHtsFM0+GaVGPD39xzJ22ZlLUrXHlo/yKMcfR7Mv0afkxMAdCnIb1aComDWhyFKj HQ63S8RddW2IcY4bhWz8TPKeaW2WFqR9GjbOIgVHs98DYVAPsIDqAJhAyu8YpKpMq80Q 5/Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698077804; x=1698682604; 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=HgO08PRy6IyNU2zj7g2IPBwXTxM3jF14s2Iin9hZx7o=; b=bv832SCWz1xBWJxft5YbCisJuaPDoVyvzlTVh9LsmO7uhbrVTZq7m96y+XBK79pRo5 dbHA+9zruHY3YNk5BYegWxyPbq6jd6xvwuQSppj3ykmfP9X/aEp6esAD1sWqinEDxxk6 VjmQiRClWjsiXs2bLR1Vro3bksbIWvcU1St+JUPK/3OtCpcearCkDEzOCD+v8GayQTY8 rCyqDq3McXuwmW2hyWhV01vaMv6oyY19+SW6H9X9ZQ4gmZOBxIMuTD1ji9etPmxaOqNX E4VU1TrmE7Av62Y9JKIENJySCoF7fRDnQHfeeZMLwjmSPLN+7+SUe6axtnyS+pzOAkbW 6mOQ== X-Gm-Message-State: AOJu0YzNo58kTComn5Tq4tWYxbZNT8cIYy4nKdVzerWPGhNwXPcd3efk n25gFqLAC4MauDBa41FbDFIy/RAHKT54oDLmiqo7hZHJtd4= X-Received: by 2002:a17:90a:195b:b0:27c:f845:3e3f with SMTP id 27-20020a17090a195b00b0027cf8453e3fmr9585255pjh.1.1698077804386; Mon, 23 Oct 2023 09:16:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Mon, 23 Oct 2023 18:16:33 +0200 Message-ID: Subject: Re: [PATCH v2 07/19] lib/stackdepot: rework helpers for depot_alloc_stack To: Alexander Potapenko Cc: andrey.konovalov@linux.dev, Marco Elver , 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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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, 23 Oct 2023 09:16:56 -0700 (PDT) On Mon, Oct 9, 2023 at 11:00=E2=80=AFAM Alexander Potapenko wrote: > > > +static void depot_keep_next_pool(void **prealloc) > > { > > /* > > - * If the next pool is already initialized or the maximum numbe= r of > > + * If the next pool is already saved or the maximum number of > > * pools is reached, do not use the preallocated memory. > > */ > > if (!next_pool_required) > It's not mentioned at the top of the file that next_pool_required is > protected by pool_lock, but it is, correct? > Can you please update the comment to reflect that? I'll add a clarifying comment above this access to the previous patch. I don't think it's worth to describe all locking intricacies of the existing code in other places, as atomic accesses are removed altogether later in the series anyway. Thanks!