Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-18 Thread Peter Xu
On Sat, Jan 18, 2025 at 07:15:56PM +0900, Akihiko Odaki wrote: > On 2025/01/18 2:46, Peter Xu wrote: > > On Fri, Jan 17, 2025 at 03:24:34PM +0900, Akihiko Odaki wrote: > > > On 2025/01/16 23:33, Peter Xu wrote: > > > > On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote: > > > > > On 2025

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-18 Thread Akihiko Odaki
On 2025/01/18 2:46, Peter Xu wrote: On Fri, Jan 17, 2025 at 03:24:34PM +0900, Akihiko Odaki wrote: On 2025/01/16 23:33, Peter Xu wrote: On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote: On 2025/01/16 1:14, Peter Xu wrote: On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wr

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-17 Thread Peter Xu
On Fri, Jan 17, 2025 at 03:24:34PM +0900, Akihiko Odaki wrote: > On 2025/01/16 23:33, Peter Xu wrote: > > On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote: > > > On 2025/01/16 1:14, Peter Xu wrote: > > > > On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote: > > > > > Functio

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread Akihiko Odaki
On 2025/01/17 1:13, BALATON Zoltan wrote: On Thu, 16 Jan 2025, Peter Maydell wrote: On Tue, 14 Jan 2025 at 19:12, Peter Xu wrote: On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote: There's at least one test in the arm qtests that will hit this. I suspect that you'll find that mos

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread Akihiko Odaki
On 2025/01/16 23:33, Peter Xu wrote: On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote: On 2025/01/16 1:14, Peter Xu wrote: On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote: Functionally, the ordering of container/subregion finalization matters if some device tries to

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread Peter Xu
On Thu, Jan 16, 2025 at 02:50:26PM +, Peter Maydell wrote: > On Tue, 14 Jan 2025 at 19:12, Peter Xu wrote: > > > > On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote: > > > There's at least one test in the arm qtests that will hit this. > > > I suspect that you'll find that most arc

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread BALATON Zoltan
On Thu, 16 Jan 2025, Peter Maydell wrote: On Tue, 14 Jan 2025 at 19:12, Peter Xu wrote: On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote: There's at least one test in the arm qtests that will hit this. I suspect that you'll find that most architectures except x86 (where we don't

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread Peter Maydell
On Tue, 14 Jan 2025 at 19:12, Peter Xu wrote: > > On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote: > > There's at least one test in the arm qtests that will hit this. > > I suspect that you'll find that most architectures except x86 > > (where we don't have models of complex SoCs and

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-16 Thread Peter Xu
On Thu, Jan 16, 2025 at 02:37:38PM +0900, Akihiko Odaki wrote: > On 2025/01/16 1:14, Peter Xu wrote: > > On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote: > > > Functionally, the ordering of container/subregion finalization matters if > > > some device tries to a container during final

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Akihiko Odaki
On 2025/01/16 1:14, Peter Xu wrote: On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote: Functionally, the ordering of container/subregion finalization matters if some device tries to a container during finalization. In such a case, | ^ so

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Peter Xu
On Thu, Jan 16, 2025 at 12:52:56AM +0900, Akihiko Odaki wrote: > Functionally, the ordering of container/subregion finalization matters if > some device tries to a container during finalization. In such a case, | ^ something is missing here, feel free to

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Akihiko Odaki
On 2025/01/16 0:40, Peter Xu wrote: On Wed, Jan 15, 2025 at 11:54:56PM +0900, Akihiko Odaki wrote: On 2025/01/15 22:43, Peter Xu wrote: On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote: On 2025/01/15 2:02, Peter Xu wrote: On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wr

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Peter Xu
On Wed, Jan 15, 2025 at 11:54:56PM +0900, Akihiko Odaki wrote: > On 2025/01/15 22:43, Peter Xu wrote: > > On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote: > > > On 2025/01/15 2:02, Peter Xu wrote: > > > > On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: > > > > > memory_

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Akihiko Odaki
On 2025/01/15 22:43, Peter Xu wrote: On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote: On 2025/01/15 2:02, Peter Xu wrote: On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: memory_region_finalize() is not a function to tell the owner is leaving, but the memory region

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-15 Thread Peter Xu
On Wed, Jan 15, 2025 at 01:46:29PM +0900, Akihiko Odaki wrote: > On 2025/01/15 2:02, Peter Xu wrote: > > On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: > > > memory_region_finalize() is not a function to tell the owner is leaving, > > > but > > > the memory region itself is being d

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-14 Thread Akihiko Odaki
On 2025/01/15 2:02, Peter Xu wrote: On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: memory_region_finalize() is not a function to tell the owner is leaving, but the memory region itself is being destroyed. It is when the lifecycle of the MR is the same as the owner. That holds

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-14 Thread Peter Xu
On Tue, Jan 14, 2025 at 05:42:57PM +, Peter Maydell wrote: > On Tue, 14 Jan 2025 at 17:02, Peter Xu wrote: > > > > On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: > > > memory_region_finalize() is not a function to tell the owner is leaving, > > > but > > > the memory region it

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-14 Thread Peter Maydell
On Tue, 14 Jan 2025 at 17:02, Peter Xu wrote: > > On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: > > memory_region_finalize() is not a function to tell the owner is leaving, but > > the memory region itself is being destroyed. > > It is when the lifecycle of the MR is the same as t

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-14 Thread Peter Xu
On Tue, Jan 14, 2025 at 05:43:09PM +0900, Akihiko Odaki wrote: > memory_region_finalize() is not a function to tell the owner is leaving, but > the memory region itself is being destroyed. It is when the lifecycle of the MR is the same as the owner. That holds true I suppose if without this patch

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-14 Thread Akihiko Odaki
On 2025/01/14 0:57, Peter Xu wrote: On Sat, Jan 11, 2025 at 01:15:24PM +0900, Akihiko Odaki wrote: On 2025/01/11 0:18, Peter Xu wrote: On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote: On 2025/01/10 4:37, Peter Xu wrote: On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote:

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-13 Thread Peter Xu
On Sat, Jan 11, 2025 at 01:15:24PM +0900, Akihiko Odaki wrote: > On 2025/01/11 0:18, Peter Xu wrote: > > On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote: > > > On 2025/01/10 4:37, Peter Xu wrote: > > > > On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: > > > > > On Thu, Jan 0

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-10 Thread Akihiko Odaki
On 2025/01/11 0:18, Peter Xu wrote: On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote: On 2025/01/10 4:37, Peter Xu wrote: On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote: On Thu, 9 Jan 2025, Akihiko Odaki wr

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-10 Thread Peter Xu
On Fri, Jan 10, 2025 at 05:43:15PM +0900, Akihiko Odaki wrote: > On 2025/01/10 4:37, Peter Xu wrote: > > On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: > > > On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote: > > > > On Thu, 9 Jan 2025, Akihiko Odaki wrote: > > > > > Do not

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-10 Thread Akihiko Odaki
On 2025/01/10 4:37, Peter Xu wrote: On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote: On Thu, 9 Jan 2025, Akihiko Odaki wrote: Do not refer to "memory region's reference count" -

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-09 Thread Peter Xu
On Thu, Jan 09, 2025 at 02:29:21PM -0500, Peter Xu wrote: > On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote: > > On Thu, 9 Jan 2025, Akihiko Odaki wrote: > > > Do not refer to "memory region's reference count" > > > - > > > > > > Now M

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-09 Thread Peter Xu
On Thu, Jan 09, 2025 at 01:30:35PM +0100, BALATON Zoltan wrote: > On Thu, 9 Jan 2025, Akihiko Odaki wrote: > > Do not refer to "memory region's reference count" > > - > > > > Now MemoryRegions do have their own reference counts, but they will not > >

Re: [PATCH v7 1/2] memory: Update inline documentation

2025-01-09 Thread BALATON Zoltan
On Thu, 9 Jan 2025, Akihiko Odaki wrote: Do not refer to "memory region's reference count" - Now MemoryRegions do have their own reference counts, but they will not be used when their owners are not themselves. However, the documentation of memory_

[PATCH v7 1/2] memory: Update inline documentation

2025-01-08 Thread Akihiko Odaki
Do not refer to "memory region's reference count" - Now MemoryRegions do have their own reference counts, but they will not be used when their owners are not themselves. However, the documentation of memory_region_ref() says it adds "1 to a memory re