From patchwork Fri Feb 10 21:15:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 55586 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1181358wrn; Fri, 10 Feb 2023 13:19:01 -0800 (PST) X-Google-Smtp-Source: AK7set8pWbEAnhOZmL1nG2sBChrsiQaHq4Y+KpePviwPETpyhu7oJqcrmx3v3O2aq3Uxp7PM+w/s X-Received: by 2002:a17:907:7293:b0:8af:2b80:a1a with SMTP id dt19-20020a170907729300b008af2b800a1amr11078244ejc.10.1676063940871; Fri, 10 Feb 2023 13:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676063940; cv=none; d=google.com; s=arc-20160816; b=zaR0MLLa/WaOpVHKvGMTVOQWj0nC8MFwHnx3xYy1KNifNm+lsNIkx0KNPZWZEF4Oyx 1C5VwD90iX33I6VJWj0sRAkptadwB8WBR6D/vjb9433W3PgGAX8evuB1we/Bfvb5FU4Y aEvImTg+fOYSlXL7Pj/gCAvwKBSLHLMm1W7n4FLkqKUq8/ivXdE5zhh99T9gUVnqEbUe dTGJmpecex0SXWYe4yN8u+6/lxgnLoDnaCTaNa61mCOHb4t+vEAlXBNhXI8QSv99UtGy RL0pZJ/W0eM+KCtVheEnYrqXeNRhgO1s6NLGfW32FqAdLkP7ET1Z34ZHTbO1pb0AflZM TH7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vdN0qpq7PVidlsBHChLWKkpFVAJ9uzHha5rImS4k+3M=; b=ckQP1Z7lq4MWA9s1tf7ksEx9au2k6hUAegJnAIa9IZcIEffxbFCKhHi1ZCO+ASS2uZ Yy+1BpxwC21GAz8gpb9W35E9xvq5a2Ttqs0LVYN/LxNg862HDsWaymwirHpiJvypnJTE siudwGXVxICxhtlA4D8tPDK6ySd18rHEZgvx8Y09vYd62HTf9RfcsQR+RaqfLl1lW6x1 p/44r7DbCTICpv/hcaT61yH617vUDIicb84n050si9k9ZUAJov+yxik1nrMbCRvY/EZS +5ij3wjYMtxvxCUkQoXiPX6oggOObPm1d8zJBnB5EJUL0vWY60m0Sc2ZqJkGyTUvFPE1 5ISA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KLl8qvzo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vj14-20020a170907130e00b00888099f2020si6164086ejb.412.2023.02.10.13.18.37; Fri, 10 Feb 2023 13:19:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KLl8qvzo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233598AbjBJVRy (ORCPT + 99 others); Fri, 10 Feb 2023 16:17:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233142AbjBJVRh (ORCPT ); Fri, 10 Feb 2023 16:17:37 -0500 Received: from out-49.mta1.migadu.com (out-49.mta1.migadu.com [95.215.58.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4272112595 for ; Fri, 10 Feb 2023 13:17:18 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1676063836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vdN0qpq7PVidlsBHChLWKkpFVAJ9uzHha5rImS4k+3M=; b=KLl8qvzoKbycCxdT4nCBIk0Y5JSFEiRTzE8rQ7hPWQgJyI6aNYe9J4JiYp9VP8KyQscvcE TnBdBtXz72gahKjUZfNLixZQ+HBoFx1lollCt6vbrb/4uXRxWFRj+bxxz26jLclDITfqn0 lOVvAXmBPC4TV8M5PBP+IoohhLxIuWs= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH v2 11/18] lib/stackdepot: rename init_stack_pool Date: Fri, 10 Feb 2023 22:15:59 +0100 Message-Id: <23106a3e291d8df0aba33c0e2fe86dc596286479.1676063693.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757480422610765154?= X-GMAIL-MSGID: =?utf-8?q?1757480422610765154?= From: Andrey Konovalov Rename init_stack_pool to depot_init_pool to align the name with depot_alloc_stack. No functional changes. Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/stackdepot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 97bba462ee13..7f5f08bb6c3a 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -218,7 +218,7 @@ int stack_depot_init(void) } EXPORT_SYMBOL_GPL(stack_depot_init); -static bool init_stack_pool(void **prealloc) +static bool depot_init_pool(void **prealloc) { if (!*prealloc) return false; @@ -265,12 +265,12 @@ depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) /* * smp_store_release() here pairs with smp_load_acquire() from * |next_pool_inited| in stack_depot_save() and - * init_stack_pool(). + * depot_init_pool(). */ if (pool_index + 1 < DEPOT_MAX_POOLS) smp_store_release(&next_pool_inited, 0); } - init_stack_pool(prealloc); + depot_init_pool(prealloc); if (stack_pools[pool_index] == NULL) return NULL; @@ -399,7 +399,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, * lock. * * The smp_load_acquire() here pairs with smp_store_release() to - * |next_pool_inited| in depot_alloc_stack() and init_stack_pool(). + * |next_pool_inited| in depot_alloc_stack() and depot_init_pool(). */ if (unlikely(can_alloc && !smp_load_acquire(&next_pool_inited))) { /* @@ -435,7 +435,7 @@ depot_stack_handle_t __stack_depot_save(unsigned long *entries, * We didn't need to store this stack trace, but let's keep * the preallocated memory for the future. */ - WARN_ON(!init_stack_pool(&prealloc)); + WARN_ON(!depot_init_pool(&prealloc)); } raw_spin_unlock_irqrestore(&pool_lock, flags);