Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1099019rdb; Mon, 19 Feb 2024 04:25:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXC0rl4M9WaPe4MlTEBGT8nisZs6Ru4SzcGoCvoyafIL29LM7P/a/Yd2q33JrvaJc1jsxTaFpJj2IAjSsscpWYw7EpLvHn4V9pXWHp8cQ== X-Google-Smtp-Source: AGHT+IHUb/bU0syCOHRxJEsmYvNJmAK4PgVA9EmuDQbOjDvKC27JxWxCXdv0rHYJeaGLpSas4GgV X-Received: by 2002:a17:906:a38d:b0:a3e:5c65:9e27 with SMTP id k13-20020a170906a38d00b00a3e5c659e27mr2759915ejz.56.1708345540397; Mon, 19 Feb 2024 04:25:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708345540; cv=pass; d=google.com; s=arc-20160816; b=l5Mfd2JFPYHHRRbN52+rUck41DUINXEGuud6OlMNvGJH9mx6InqsN5s+sm/UdWkQ7B Cw7D+yKiUMkKIvRw4GGkiPOwkZPt3a/i8ISEShKBh0ohR+wnyYuVC3ho9VXQTWyp9Jwi FLVC1834iUmqdaaFW+sH8Ee+SqoAjosx7IirGlgQd5SgyrykRpznwwaMb3dY+dP7ldEP H7l/vuXRw0l9fGvuwyNmbZbRMtysRB/O5YH5FNdSPjBeDaUdzxLR/DMUaLmmFlK4A/mh Wx+nxryKFWlgs9PQFq5cgmpGvef3h+/aYLDjsWjGBMAxx8fkMo00RlKiQcSv/mH+NLk0 8X/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=G3iKo/rk1UF3kO4jq6a4VEJ+d4JoJMZpqBK3xr/jexI=; fh=JICrN3X6ZSdqgXn1UcFoGxrypuehqkZHVDlLzs9iIw0=; b=AN8LurAGG7e4m39F/DGhkt4+5Ql9GRqsa07cTNojWleoW0oZgeBJSLf0Manl4RxiPk lOJFdpI27DPlO5a8KybbZzj4Zfam+9HBeJst3t7zmPUjcY8rXvq9X3owQmq9td1XVgnM KKqrsKhqKoafUBMEsndnLGrqrSvivxEFiRH3FrObloMMvvYNJRuAQn9f6knBK2BeUx/P muU7M+CxeNqyNGgZoOhczD9Bk0kvvlEWRPt2uEs5d8cnPr00he/0/oe+YirIS2MunF/I msfirO87c9SfsVYrvMqEftBSn6EPuboQimXYD7+ar1V5gOXTOiXtcduyS2ZftFCO9Wn1 nn7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H4u7Qbif; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71301-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qw17-20020a1709066a1100b00a3ec245bc6dsi397946ejc.620.2024.02.19.04.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:25:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H4u7Qbif; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71301-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1B2E01F25609 for ; Mon, 19 Feb 2024 12:25:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CA472E84B; Mon, 19 Feb 2024 12:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H4u7Qbif" 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 840362E645; Mon, 19 Feb 2024 12:25:09 +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=1708345509; cv=none; b=bN2OXPMolCI0DwRs5YsrhDqhIC0OG6rFuNDkNsYq3Qns4RuGxv5hy5lt9uAZ/8ulZyZDIEbPUKFWg2FTUItjXUsp0VTyQHgqNi4po+c+ph6MgL+PpRude2+bAi1j2Jh0PuABEHnvFsjJsvHazME2Y4xbL2Cv3FuPtrahJ/039dc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708345509; c=relaxed/simple; bh=Qt19ljXFDHGnHsJC4+Ibe49Z9ewRnSNk2tYJMGxyCEA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=j0bP0SjsM+KhF0ChobTcqOEemW9+IeBxM9jrY7E53zZ4tcyiQTtuIdgJmGER7e7tUSIdM+BODsWBgpQup5s7Bx80abBxaBav8QikMfvvWpM8aw6VjDu4t37FeD9zbGEdQcGRJeIlQ3EYYGKuqe3w51DhV+jTyLNSUPldDc5X6SM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H4u7Qbif; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F711C43609; Mon, 19 Feb 2024 12:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708345509; bh=Qt19ljXFDHGnHsJC4+Ibe49Z9ewRnSNk2tYJMGxyCEA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=H4u7QbifuxAeJ6eSh940HphqB9PmtRuzg+WBkSsKMWqS3vtrXfp18rtzxrUJOUm3e dghQfLgD5drU3GkO28skuRzB7lgL8yd9FoaW5jOqJ8O2ofm7g8hDU62m3SHx54gYEY P0FQe/vpi7yF8h0k6zMT4MWaRJCX/OPUJ5f4wyHSGCr15tDNM0rmeCB4ptqF37t/p3 KGUw7j93NmCTXtkHJjfbQiH6yn3YQEFH/db4yqG5u6r44tn2XLjIwACIAvzKhQFOIp ki6KlTWmUHgN9TvIkZSGS43MZuw5vhHz6dc7Tn50rwYSMVY94SRkzCV6Lc4vZq1lVY M6eUzZyJY0zyA== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Andrea Parri , Samuel Holland Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Daniel Borkmann , Jason Baron , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , bpf@vger.kernel.org, Alexandre Ghiti , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH 0/7] riscv: Various text patching improvements In-Reply-To: References: <20240212025529.1971876-1-samuel.holland@sifive.com> Date: Mon, 19 Feb 2024 13:25:05 +0100 Message-ID: <87msrwfxpa.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Andrea Parri writes: > Hi Samuel, > > On Sun, Feb 11, 2024 at 06:55:11PM -0800, Samuel Holland wrote: >> Here are a few changes to minimize calls to stop_machine() and >> flush_icache_*() in the various text patching functions, as well as >> to simplify the code. >> >> >> Samuel Holland (7): >> riscv: jump_label: Batch icache maintenance >> riscv: jump_label: Simplify assembly syntax >> riscv: kprobes: Use patch_text_nosync() for insn slots >> riscv: Simplify text patching loops >> riscv: Pass patch_text() the length in bytes >> riscv: Use offset_in_page() in text patching functions >> riscv: Remove extra variable in patch_text_nosync() > > This does look like a nice clean-up. Just curious (a "teach me"-like question), > how did you test these changes? kselftests, micro-benchmarks, other? > > BTW, I recall a parallel work from Alex and Bjorn [1] that might have some minor > conflict with these changes; + both of them to Cc: for further sync. Indeed! I think Alex is still working on the v2.