Attention is currently required from: fixeria.
osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email )
Change subject: erab_fsm: handle RELEASE.{cmd,ind} in state erab_wait_setup_rsp
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39524?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I91a010f304456c1593ef257051a912f0fe8ae2a1
Gerrit-Change-Number: 39524
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 14 Feb 2025 11:06:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
kirr has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email )
Change subject: trx_toolkit/*: Try to avoid copying burst data where possible
......................................................................
Patch Set 2:
(1 comment)
File src/target/trx_toolkit/data_msg.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39537/comment/7ef9a2d0_e46bcac8?u… :
PS2, Line 336: burst = memoryview(burst)[:EDGE_BURST_LEN]
> I never used memoryview nor read about the details, but in line "burst = memoryview(burst)[:EDGE_BUR […]
ah, now I see. So memoryview(burst) creates only a view of original burst object data. This is basically a small object that points to another base object to know where to get the data without copying them. Then slice operation of memoryview returns another memoryview without copying the data - that adjusted memoryview refers to base object, but knows to view not the whole data of it, but only some range. It is still a small object that does not copy base's data.
```
In [7]: burst = bytearray(range(10))
In [8]: burst
Out[8]: bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t')
In [9]: burst *= 100
In [10]: burst
Out[10]: bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t...\x00\x01\x02\x03\x04\x05\x06\x07\x08\t')
In [11]: len(burst)
Out[11]: 1000
In [12]: sys.getsizeof(burst)
Out[12]: 1057
In [13]: m = memoryview(burst)
In [14]: len(m)
Out[14]: 1000
In [15]: sys.getsizeof(m)
Out[15]: 184
In [16]: m[0]
Out[16]: 0
In [17]: burst[0]
Out[17]: 0
In [18]: burst[1]
Out[18]: 1
In [19]: m[1]
Out[19]: 1
In [20]: m[2]
Out[20]: 2
In [21]: burst[2]
Out[21]: 2
In [22]: mm = m[2:]
In [23]: len(mm)
Out[23]: 998
In [24]: sys.getsizeof(mm)
Out[24]: 184
In [25]: mm[0]
Out[25]: 2
In [26]: m[2]
Out[26]: 2
In [27]: mm[1]
Out[27]: 3
In [28]: m[3]
Out[28]: 3
In [29]: burst[3]
Out[29]: 3
```
Please see https://docs.python.org/3/library/stdtypes.html#memoryview for details.
P.S. Unfortunately constant-size of memoryview structure turned out to be not so small, so it still contributes to overhead for not so small bursts. https://github.com/python/cpython/blob/v3.11.9-9-g1b0e63c81b5/Include/memor…
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I147da2f110dedc863361059c931f609c28a69e9c
Gerrit-Change-Number: 39537
Gerrit-PatchSet: 2
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Feb 2025 20:22:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: kirr <kirr(a)nexedi.com>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: kirr.
pespin has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email )
Change subject: trx_toolkit/*: Try to avoid copying burst data where possible
......................................................................
Patch Set 2:
(1 comment)
File src/target/trx_toolkit/data_msg.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39537/comment/c9b0f578_e15f2838?u… :
PS2, Line 336: burst = memoryview(burst)[:EDGE_BURST_LEN]
> Could you please clarify? Do you mean here that we create a copy via `self. […]
I never used memoryview nor read about the details, but in line "burst = memoryview(burst)[:EDGE_BURST_LEN]" I'd expect 2 steps:
1- "memoryview(burst)" Generate a memory view of burst
2- "[:EDGE_BURST_LEN]" Generate a slice (potentialy a copy?) of the burst memory view you just created
So as mentioned, I have no real knowledge, just mentioning in case "memoryview(memoryview(burst)[:EDGE_BURST_LEN])" makes sense.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I147da2f110dedc863361059c931f609c28a69e9c
Gerrit-Change-Number: 39537
Gerrit-PatchSet: 2
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: kirr <kirr(a)nexedi.com>
Gerrit-Comment-Date: Thu, 13 Feb 2025 19:50:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: kirr <kirr(a)nexedi.com>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
kirr has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email )
Change subject: trx_toolkit/*: Try to avoid copying burst data where possible
......................................................................
Patch Set 2:
(1 comment)
File src/target/trx_toolkit/data_msg.py:
https://gerrit.osmocom.org/c/osmocom-bb/+/39537/comment/729d63f9_41a26f6c?u… :
PS2, Line 336: burst = memoryview(burst)[:EDGE_BURST_LEN]
> Just speculating here, but with the new version you posted you are still potentially creating a copy […]
Could you please clarify? Do you mean here that we create a copy via `self.burst = bytearray(burst)` later? Or do you mean that we create a copy somewhere else?
The copy in `self.burst = bytearray(burst)` is necessarry in current data model where we want .burst to be a bytearray or bytes. In theory we could keep it as memoryview as well, but memoryview does not have .translate method and so then conversion from unpacked bits to soft bits will become much slower again.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39537?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I147da2f110dedc863361059c931f609c28a69e9c
Gerrit-Change-Number: 39537
Gerrit-PatchSet: 2
Gerrit-Owner: kirr <kirr(a)nexedi.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Feb 2025 19:11:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>