From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7866C433F5 for ; Mon, 23 May 2022 12:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=te13N1dQWC4oCs0TD/RUNDN5a6Q4xNc0nPUIAXVDOhw=; b=k7zVZiVQBQbl5y JbbZRy6iHRn69FGXICr8wHPNpAja+Ec6PpMgkt+zDuVZBQlJa591aW4oXYy6OGBw2k+H+PT8gdeyG gbSRpunnOFWzytaD4iNuiLgSUW/J1cH1HwaCVoaPTC03XtUOe2g1JF0GJnBzVgdnVZzDP+xyCNU3b UzHyzDQDhszRe+dPZeke7NiVjCVWqlI3bOgWyepmLSBx+GjCMd7ulnCiKk21g/ke8vRMnqlyt2mbA dcvarg8tXUKu+7vrWLmxkozloiENyFD0rFWKhh7EskkKpHq/1MyknjBkTRIoQBKNBqpJZhlxBv7Yg faiCHd31+RyJoNkby2iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt6ry-003zkm-Ee; Mon, 23 May 2022 12:09:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt6KM-003kGf-5i for linux-arm-kernel@lists.infradead.org; Mon, 23 May 2022 11:34:23 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_043422_390254_B7F1B0C3 X-CRM114-Status: GOOD ( 17.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel