Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1067411rdb; Fri, 16 Feb 2024 04:36:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVaUV2f2oyf9yaqa3lGU0eY3fjXKHSBZFUFP5IwYdt6VkW0IS3SwC76oIWxHyzxeiK8ToFNjJ6TsF2AWAn2lKMdt/xBYfTMsilp1XWkaw== X-Google-Smtp-Source: AGHT+IGOCkDiTSXp10v6l14dzEezM5sjICGfV0A8oLJxb877jVpDmBVH0FYDCG/Sjifhpmv9HkCL X-Received: by 2002:a05:6a20:4ba5:b0:19e:9967:4e0b with SMTP id fu37-20020a056a204ba500b0019e99674e0bmr3395083pzb.14.1708086974462; Fri, 16 Feb 2024 04:36:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708086974; cv=pass; d=google.com; s=arc-20160816; b=O2qUxugvKl8bYxy1oScTZgOBa/n6sOlcc+6vJm+xhHTEGddOofYYMmW7Z/Qd3l1ELh Dj2qJqhAZdsdDhKXvM+XaWGyx2gmITugDJA8C0bA3NNXsuPdgPKnhE0ipiIt8j6h0NVO PH9KhYm/2/xO3+Omv0NIul1/dCVtjVluip0M6yICe4JGU6I0bp5luKIGDW2sSudEbCP6 pEFJmzDDyyOMRRtdsGlc7wjuN3Palj19C9ANo0E7nASccGq9oooYrFC8z/Wv93YnYf7E 1wu9oXsbl7mSpnSoLboVUncuLi/GUZaAQGDbq4QsR41y9ODsKm1QmfyxIcf2oJrGDav5 kNew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=jcK6Iv3QWlziWC6wCXOhAjbzsWkcCw53R9vniONp1iA=; fh=r8G2JENgcRo/RTe4xvZO7IzPLZ7yvHykzgF2Da/HHrw=; b=Hw9nMh0XXH3zHg4Vn2jIUuwcgMGzvtdbFHqdGmNs2fMKax99rhVFYrL7wgSMFd4s9W TCmt8wo1umBEojWw47xg1dyIOkVUVJmOEplITfWaXWxo1GNzvUKMdjfudBxeLzZUQCfb 0fzRxTdxy+G/m0mhOTlqA7leT/QVEmIsUyuiN1x2j6+Dz+U8ZKELI8jmdSm6SMnwhrxk Xdz1shK+HApwG7GUZuta5AQVDmQvObX3EM1NpfubdbN9gJfh2vTRGlhDNEqfAg8KKf4X kaUaXCd27qVwydR4meeNKkhz7EOTdi0HCzsz5Xlwyz3LFB0DnJssvBOft4Kp1D7P3WkQ vD7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-68576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id hk9-20020a17090b224900b002993b6846d5si712796pjb.85.2024.02.16.04.36.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 04:36:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-68576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 44FADB21510 for ; Fri, 16 Feb 2024 12:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AEF87E762; Fri, 16 Feb 2024 12:34:31 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 859B0339A1 for ; Fri, 16 Feb 2024 12:34:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708086870; cv=none; b=HyzC5RRzg5NsXXMLON2hNKxFEvEX91CyGZ8ynPpjOcpMin71NTzWPErY0k2Yw33XkCTAP7ENpObriKEspqFaSgXYt4b99op09r1N0LqJqT4dW6IzjdeuaXNwtJmYc2gSSiYa14gRuX7QlwnmtnHr//nuuELcxLozu6Oit/NFAME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708086870; c=relaxed/simple; bh=x4PKLZP4+EHRWnPbPhu64B7Lq3y21gG0G8Z1bOVklRI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G8gwh4RvlmpDsenA2r1Wud6CPtNqm00ANZlCdmGdxqjFU5+eLFGM50ASKqcktfunoh5rvyssE6Pung49fXR0tMJN/mPpPgyTavlk6GHGpj+9G2Vcszp++JyyXVX+kRn3YxWi7n+Jo87CSpiK4Lea6gzYGY7c5OK1ooL/Vg7HiPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9663DC433C7; Fri, 16 Feb 2024 12:34:25 +0000 (UTC) Date: Fri, 16 Feb 2024 12:34:23 +0000 From: Catalin Marinas To: Ryan Roberts Cc: Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 17/18] arm64/mm: __always_inline to improve fork() perf Message-ID: References: <20240215103205.2607016-1-ryan.roberts@arm.com> <20240215103205.2607016-18-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215103205.2607016-18-ryan.roberts@arm.com> On Thu, Feb 15, 2024 at 10:32:04AM +0000, Ryan Roberts wrote: > As set_ptes() and wrprotect_ptes() become a bit more complex, the > compiler may choose not to inline them. But this is critical for fork() > performance. So mark the functions, along with contpte_try_unfold() > which is called by them, as __always_inline. This is worth ~1% on the > fork() microbenchmark with order-0 folios (the common case). > > Acked-by: Mark Rutland > Signed-off-by: Ryan Roberts Acked-by: Catalin Marinas