From mboxrd@z Thu Jan 1 00:00:00 1970 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 381901BE871; Sun, 14 Sep 2025 13:02:57 +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=1757854978; cv=none; b=dDcehig+a79snmTlySJi4kcy6cFSn91p/j9QU7YCiVnb/0NkyROrh0Q0DCs72xTSGs087/uXN7tJBHc7Dsfc/pHzCrzQF5hTikg7MpwygzirCbhIWRIrTuDHoZxpZkBJJpMLVxVWoT43S1Jk9OVgCBH+oAL9DOytmcS/LUocy8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757854978; c=relaxed/simple; bh=YYDp1ijpwWt09S5HVfnu4kiNUYZD0PpGT+F41GYPadw=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=AtzFaIqy5v6F6spUhMDSWDtAVls5ondLd1dJAJp6cfT7IAyfeP76UB8V18YvbHHAWqshAo5NtLzYkSw4RRxsn2PZdbpvEYbrE41EqHM3JDbfDB/IHGr5KXwyFFWv4XKHPAt38zqZgZSL4R5RJaZ5GCfyqyAb/0//2RKorq8uffU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tfN1I3Sx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tfN1I3Sx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FC9EC4CEF0; Sun, 14 Sep 2025 13:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757854977; bh=YYDp1ijpwWt09S5HVfnu4kiNUYZD0PpGT+F41GYPadw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tfN1I3SxboPtqg8tVy6FWKrpiKrpPQ9z8Cv44K48WXiEcad4ZNNLZydJ65S/qI29k EwBkEyHjGDbdx6IiIbX8u+Gc9sh1/7LhYv0KuDenuZg3dAkx920SCHCrx3ejXdB4CZ kkZv+EZ8tXEH2aLHGTp7G3jfLmgvYXteZnydpp0UsPKMgf3HAzoIv8i/yxHQkoxOSP 75VFXHCUQMfSFW3LEOUGVqLmXvVBvEcw/SnA32l/9OUmQ7vCkJ2ODaCUXeNlxE0Rl4 8f6jp6BUeK9hULpSdxe6NnOO5CuoAwWTcVvlywnTL2AONaQjHYXi1lA376VzJCi5nx sdvSbzTn6c09A== Date: Sun, 14 Sep 2025 22:02:42 +0900 From: Masami Hiramatsu (Google) To: Randy Dunlap Cc: Jinchao Wang , Andrew Morton , Peter Zijlstra , Mike Rapoport , Alexander Potapenko , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Kees Cook , Alice Ryhl , Sami Tolvanen , Miguel Ojeda , Masahiro Yamada , Rong Xu , Naveen N Rao , David Kaplan , Andrii Nakryiko , Jinjie Ruan , Nam Cao , workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, Andrey Ryabinin , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, "David S. Miller" , Mathieu Desnoyers , linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH v4 03/21] HWBP: Add modify_wide_hw_breakpoint_local() API Message-Id: <20250914220242.1e8dc83e011b9568dd7a5ace@kernel.org> In-Reply-To: <6b5e5d3e-5db8-44f2-8dca-42f317be8e0d@infradead.org> References: <20250912101145.465708-1-wangjinchao600@gmail.com> <20250912101145.465708-4-wangjinchao600@gmail.com> <6b5e5d3e-5db8-44f2-8dca-42f317be8e0d@infradead.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: workflows@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 12 Sep 2025 21:13:07 -0700 Randy Dunlap wrote: > > > On 9/12/25 3:11 AM, Jinchao Wang wrote: > > +/** > > + * modify_wide_hw_breakpoint_local - update breakpoint config for local cpu > > + * @bp: the hwbp perf event for this cpu > > + * @attr: the new attribute for @bp > > + * > > + * This does not release and reserve the slot of HWBP, just reuse the current > > of a HWBP; it just reuses OK, > > and preferable s/cpu/CPU/ in comments. OK. Thanks for review! > > > + * slot on local CPU. So the users must update the other CPUs by themselves. > > + * Also, since this does not release/reserve the slot, this can not change the > > + * type to incompatible type of the HWBP. > > + * Return err if attr is invalid or the cpu fails to update debug register > > + * for new @attr. > > + */ > > +#ifdef CONFIG_HAVE_REINSTALL_HW_BREAKPOINT > > +int modify_wide_hw_breakpoint_local(struct perf_event *bp, > > + struct perf_event_attr *attr) > > +{ > > -- > ~Randy > -- Masami Hiramatsu (Google)