Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1836278ioo; Mon, 23 May 2022 04:35:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa7J5j+pdSRfqHzcmo22KRkloYPmCAmZ6bctT0+T+Q1+FXBOkK29B5XywJo1EbOAPWIuAc X-Received: by 2002:a17:902:e484:b0:161:6657:dc5b with SMTP id i4-20020a170902e48400b001616657dc5bmr22815316ple.2.1653305750603; Mon, 23 May 2022 04:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653305750; cv=none; d=google.com; s=arc-20160816; b=gjXiXJh3nR9TkZJE/dGDmD1For6IZ7j2c+U+M1Z/8u6HHUlwa5lkF9u9YabQImfond hTJQbI62pA48oWHZabV6VPIqIIJO9z9LZWkzTw2e4ezK5LFmcplhnbd+9KwfgwkZnDNJ /fD7ckNz3TY/zsmsNqU7gXHtTevz8aP5yXDHdckxgfGvfWdU2AUR30qNgwUw6qIwaxOL LNQCuEosaILY1N4fL++vMH4stWX+zUsBIvIDREjXPKyjYv3XAwZlLUNW+X6oLQBWASDS QHQZffN5yK6Kmz0o80w4GqsD05ZPgA0fmeKn8QVs+EZ6IVvKD/owD35qZ9/kamt2DvpA 5FWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=VDTsDtT+zEBcCyg/9LAsRqHP7aUfyXXVX+q1VHfTNxE=; b=UC460/KdQEFVX2KOJDfzO8MZbJccpU1y352CFJQi2fmiHX+jOnPyxCvpIsixJlcZNI lwcffAwJgTBOg7Bt4bmi8t4qvQ85W1sUGMv4JSHggkOWEIE3iY6QXabNguOlOkxYnKP6 vIT4MuFucxycCL6S3pElbJvSyl4tLUu7RCRrM2lRXi5w6FyZdznnzxycirT7BIDAziSI zpYGn2HMCiF53+LqRK7tSFFIQKeR735TpNrg4HOMfw9SVDheE6Sfir2WBeUMLS437xz7 6kZ5QMrDlZjFBE+bQw/2yUIujdUVSRUrB/ZL2iySY6Er0YxZNxjoy8XTUn65+W0MtD+e 2K7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y3-20020a656c03000000b003c60fd512fbsi10392027pgu.870.2022.05.23.04.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 04:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2595F4FC55; Mon, 23 May 2022 04:35:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234898AbiEWLej (ORCPT + 99 others); Mon, 23 May 2022 07:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234962AbiEWLee (ORCPT ); Mon, 23 May 2022 07:34:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A0D0750005 for ; Mon, 23 May 2022 04:34:22 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66AFA11FB; Mon, 23 May 2022 04:34:20 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.9.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 405B23F73D; Mon, 23 May 2022 04:34:18 -0700 (PDT) Date: Mon, 23 May 2022 12:34:15 +0100 From: Mark Rutland To: andrey.konovalov@linux.dev Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Catalin Marinas , Vincenzo Frascino , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: Re: [PATCH 2/2] arm64: stacktrace: use non-atomic __set_bit Message-ID: References: <697e015e22ea78b021c2546f390ad5d773f3af86.1653177005.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Sun, May 22, 2022 at 01:50:59AM +0200, andrey.konovalov@linux.dev wrote: > From: Andrey Konovalov > > Use the non-atomic version of set_bit() in arch/arm64/kernel/stacktrace.c, > as there is no concurrent accesses to frame->prev_type. > > This speeds up stack trace collection and improves the boot time of > Generic KASAN by 2-5%. > > Suggested-by: Mark Rutland > Signed-off-by: Andrey Konovalov Acked-by: Mark Rutland Mark. > --- > arch/arm64/kernel/stacktrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c > index 33e96ae4b15f..03593d451b0a 100644 > --- a/arch/arm64/kernel/stacktrace.c > +++ b/arch/arm64/kernel/stacktrace.c > @@ -103,7 +103,7 @@ static int notrace unwind_frame(struct task_struct *tsk, > if (fp <= frame->prev_fp) > return -EINVAL; > } else { > - set_bit(frame->prev_type, frame->stacks_done); > + __set_bit(frame->prev_type, frame->stacks_done); > } > > /* > -- > 2.25.1 >