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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4AB6C636D3 for ; Tue, 31 Jan 2023 10:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbjAaKng (ORCPT ); Tue, 31 Jan 2023 05:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbjAaKnf (ORCPT ); Tue, 31 Jan 2023 05:43:35 -0500 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B820F12F08 for ; Tue, 31 Jan 2023 02:43:33 -0800 (PST) Received: by mail-vs1-xe2e.google.com with SMTP id i188so15559120vsi.8 for ; Tue, 31 Jan 2023 02:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=M753LZjz9jIM5UZsN6i1l5g2fsIv/6aiQIsgYIsM+/c=; b=enJHYOBVZFEP+cfsiWZz1361EcSHN2tXhM0kwfSjnwjcvxZI8G63emelBbN9BxT7T6 QYtzHs7d/BhL67M6Upn6azzWdc9GTKm3ME1BTDf0UpEhoEyQOwK8NJ3yrBIfDGM/Hx+E qzN99hE0qUIsi7euMl0j6eK7HlIOi5SUSVGJb78z+a4p7okqPCF8fkbHUTxo/5+5b5zv mEkWVbsKwgTdvnFQsoXQpxYyH4bDlN+lNsZl4d0OcA5GYS1s/dnJK870yuWAlYjno8d9 +/rIhv/Qk9+CpzdOrkC+MqcpvZmevXFd//udWGPSFbystpA7YtZ0zUI18HrYO8vHjNNA 0J6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=M753LZjz9jIM5UZsN6i1l5g2fsIv/6aiQIsgYIsM+/c=; b=y2HO3ooUgFmrFUJzCO4qe3F51zUgKg1nqa/7DNbY1H57Hp4hOySsGKdOKe9O7UP1XK npv4qtVDB+f1p4zDDjPLBj7Qp5t+3cpow2f4N3tnDUP6zgC+dk6INYRRMBFdMMWXsQ2h eZN0RCu5seRL+gpgsBbe+cEuKMUEuQAw4BQHZEvlhgc0smZKQ/BTiWsE+tG5d77uh9Fo /GNh/y76YuHI8ecVfeLBKNrdvY6vCh8dsqFVpasl8D3/DK7OS9UUQKj/D0WGPI7Ppa2x 3sGPY/TWdQC5enxcjFi5T61QpZ2gHcNN84WxwPuSCDSOeOuc68ad45up0/DWbzHKC5dN tTcQ== X-Gm-Message-State: AO0yUKVBHV6UEA9BHr0pLQqB3Jph7PXDdirleWaO/sSBjvTN5Fi58jzG l+vIHURSLqUtNpFXdaIqxNsvCQ1EojT3ovY5mKhsqQ== X-Google-Smtp-Source: AK7set/UCy97NS1OgWQ3E+UC3FDdA9Pde6pSsrUhHtJ36o7k6yVvsdQHeHE1uwGPFI29ub2qTqgNXtmMUSlSs1QBEeg= X-Received: by 2002:a05:6102:449:b0:3fc:3a9e:3203 with SMTP id e9-20020a056102044900b003fc3a9e3203mr634380vsq.84.1675161812760; Tue, 31 Jan 2023 02:43:32 -0800 (PST) MIME-Version: 1.0 References: <4ed1d0828e837e15566a7cfa7688a47006e3f4b3.1675111415.git.andreyknvl@google.com> In-Reply-To: <4ed1d0828e837e15566a7cfa7688a47006e3f4b3.1675111415.git.andreyknvl@google.com> From: Alexander Potapenko Date: Tue, 31 Jan 2023 11:42:56 +0100 Message-ID: Subject: Re: [PATCH 08/18] lib/stackdepot: reorder and annotate global variables To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2023 at 9:50 PM wrote: > > From: Andrey Konovalov > > Group stack depot global variables by their purpose: > > 1. Hash table-related variables, > 2. Slab-related variables, > > and add comments. > > Also clean up comments for hash table-related constants. > > Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko ... > +/* Lock that protects the variables above. */ > +static DEFINE_RAW_SPINLOCK(depot_lock); > +/* Whether the next slab is initialized. */ > +static int next_slab_inited; Might be worth clarifying what happens if there's no next slab (see my comment to patch 01).