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 638E5D30011 for ; Fri, 18 Oct 2024 15:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To: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=yEBB7Y+YOcGC5nyHTBN1F54MHm5JMX0R2N/CkQb6uRI=; b=0DXBd3a/kRXk1CgoWi1+JQtbWS Hq8Vs6nBDVyMOZmgHUwSIpPP/oj0/zJXczDDsEaEhRZ4ENmoaJnm8YXWrn4dtyBLJ+FrBkQRu3pbD xuvAIlLaqbL9ZjzotpKjx7BdQzPD1ShRGWJwL4xzUhdgBo0C4RKrgCKKm8/A17Li9Jr3yoMwh2XCv ua6ArUH4gtDNqwOjQi6N+GrnveKIkU43DhWx85DLUjs/ybktdHq5wkWTGroJDPRUdq9yZwIZ+lhde nkn5TN+a0pPeNR/WNVWAVCgPWoVLAQFEa2frNDsqD3nfduJKo1PHtW2sm/nMAK7MpIqMwU+7q0nph f+qgcHJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1otd-00000001C3G-1Vss; Fri, 18 Oct 2024 15:28:09 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1opS-00000001BPx-0grx for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2024 15:23:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 8E4EEA4443E; Fri, 18 Oct 2024 15:23:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04D35C4CEC5; Fri, 18 Oct 2024 15:23:45 +0000 (UTC) Date: Fri, 18 Oct 2024 11:24:11 -0400 From: Steven Rostedt To: Ryan Roberts Cc: Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Masami Hiramatsu , Matthias Brugger , Miroslav Benes , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 18/57] trace: Remove PAGE_SIZE compile-time constant assumption Message-ID: <20241018112411.6311a9e9@gandalf.local.home> In-Reply-To: References: <20241014105514.3206191-1-ryan.roberts@arm.com> <20241014105912.3207374-1-ryan.roberts@arm.com> <20241014105912.3207374-18-ryan.roberts@arm.com> <20241014124656.3ffb0f65@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241018_082350_311079_A5A2AB20 X-CRM114-Status: GOOD ( 14.88 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 15 Oct 2024 12:09:38 +0100 Ryan Roberts wrote: > > > > Not to mention, when function graph tracing is enabled, this gets triggered > > for *every* function call! So I do not want any runtime test done. Every > > nanosecond counts in this code path. > > > > If anything, this needs to be moved to initialization and checked once, if > > it fails, gives a WARN_ON() and disables function graph tracing. > > I'm hoping my suggestion above to decouple SHADOW_STACK_SIZE from PAGE_SIZE is > acceptable and simpler? If not, happy to do as you suggest here. Yeah, I think we can do that. In fact, I'm thinking it should turn into a kmem_cache item that doesn't have to be a power of two (but must be evenly divisible by the size of long). I'll write up a patch. -- Steve