aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-16 11:48:43 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-16 19:24:16 +0200
commite21b79cb211fa930b79b69ce9416a25816daff47 (patch)
tree3e661bb6f0f2627db5f10ada20544973c1a7490b /tests
parentf16a069fd7e34c3f94527965073df3bae0e524b1 (diff)
alloc: Change tx_window optimization strategy
Currently each tx_window combination is checked only once by using a set containing the sets of TX slots that have been checked already. This approach does not ensure, that num_tx and ul_ts really match the tx_window being tested. This does not make a difference with the current test cases probably because num_tx starts with 1 and is increased each iteration. Since the bitmap optimization is equivalent to a cache optimization strategy that only uses tx_window as key. On the other hand, ul_ts, num_tx, and rx_mask cannot be derived from tx_window, but these values are also refered to after the call to test_and_set_bit(). This makes it difficult to prove that correctness of the caching. While this will not lead to a defect, the results might be less optimal. This commit changes the optimization strategy to skip all tx_window where ul_ts and ul_ts+num_tx-1 are not both contained. This provides a similar degree of optimization like the set approach (only the iteration with num_ts == 8 is not optimized, which only applies to to ms class 18 and 29 MS) but ensures that the values of the related variables have a clear relationship. Note that the bitset based optimization for rx_window does not suffer from a possible cache inconsistency, since only tx_window and rx_window (tx_slot_count and rx_slot_count can be derived from the windows and thus are covered by the cache key) are used after the call to test_and_set_bit(). tx_window is constant over the whole lifetime of the cache. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions