alloc: Skip common TS without free USF when rating
Currently the search of the "best" slot combination is done separately from the UL slot selection, which can lead to an allocation failure due to USF exhaustion even if another combination had been possible. This commit reduces the probability for this event by skipping UL slots without free USF while calculation the capacity. Note that the implementation is rather inefficient which will be fixed by the following commits. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
5f494b8415
commit
16c6ecc365
|
@ -551,11 +551,13 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
|
|||
}
|
||||
/* Only consider common slots for UL */
|
||||
if (tx_window & rx_window & (1 << ts)) {
|
||||
if (find_free_usf(pdch) >= 0) {
|
||||
c = 32 - pdch->num_reserved(GPRS_RLCMAC_UL_TBF);
|
||||
c = OSMO_MAX(c, 1);
|
||||
capacity += c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGP(DRLCMAC, LOGL_DEBUG,
|
||||
"- Considering DL/UL slots: (TS=0)\"%s\"(TS=7), "
|
||||
|
|
|
@ -565,18 +565,18 @@ static void test_successive_allocation()
|
|||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AND_DL,
|
||||
32, "algorithm A (UL and DL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL,
|
||||
30, "algorithm B class 10 (UL and DL)");
|
||||
32, "algorithm B class 10 (UL and DL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL,
|
||||
30, "algorithm B class 12 (UL and DL)");
|
||||
32, "algorithm B class 12 (UL and DL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL,
|
||||
32, "algorithm B class 1-12 (UL and DL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL,
|
||||
27, "algorithm B class 1-29 (UL and DL)");
|
||||
32, "algorithm B class 1-29 (UL and DL)");
|
||||
|
||||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL,
|
||||
32, "algorithm A (DL and UL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AND_UL,
|
||||
15, "algorithm B class 10 (DL and UL)");
|
||||
32, "algorithm B class 10 (DL and UL)");
|
||||
|
||||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AFTER_UL,
|
||||
32, "algorithm A (DL after UL)");
|
||||
|
@ -586,12 +586,12 @@ static void test_successive_allocation()
|
|||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AFTER_DL,
|
||||
32, "algorithm A (UL after DL)");
|
||||
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AFTER_DL,
|
||||
30, "algorithm B class 10 (UL after DL)");
|
||||
32, "algorithm B class 10 (UL after DL)");
|
||||
|
||||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_ONLY,
|
||||
32, "algorithm A (UL only)");
|
||||
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_ONLY,
|
||||
30, "algorithm B class 10 (UL only)");
|
||||
32, "algorithm B class 10 (UL only)");
|
||||
|
||||
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_ONLY,
|
||||
32, "algorithm A (DL ONLY)");
|
||||
|
|
|
@ -3,17 +3,17 @@ No TFI available.
|
|||
No TFI available.
|
||||
- Failed to allocate a TS, no USF available
|
||||
No TFI available.
|
||||
No USF available
|
||||
No USF available
|
||||
No TFI available.
|
||||
No USF available
|
||||
No TFI available.
|
||||
No USF available
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No USF available
|
||||
No TFI available.
|
||||
No USF available
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
No TFI available.
|
||||
|
|
|
@ -8649,11 +8649,13 @@ Going to test assignment with many TBF, algorithm B class 10 (UL and DL)
|
|||
TBF[23] class 10 reserves .....DDC
|
||||
TBF[24] class 10 reserves ...DCD..
|
||||
TBF[25] class 10 reserves .....DCD
|
||||
TBF[26] class 10 reserves ...CD...
|
||||
TBF[27] class 10 reserves .....DDC
|
||||
TBF[28] class 10 reserves ...CD...
|
||||
TBF[29] class 10 reserves ...DDC..
|
||||
Successfully allocated 30 UL TBFs
|
||||
TBF[26] class 10 reserves ...DDCD.
|
||||
TBF[27] class 10 reserves ...CD...
|
||||
TBF[28] class 10 reserves .....DDC
|
||||
TBF[29] class 10 reserves ...CD...
|
||||
TBF[30] class 10 reserves ...CD...
|
||||
TBF[31] class 10 reserves ...CD...
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm B class 12 (UL and DL)
|
||||
TBF[0] class 12 reserves ...DDCD.
|
||||
TBF[1] class 12 reserves .....DCD
|
||||
|
@ -8681,11 +8683,13 @@ Going to test assignment with many TBF, algorithm B class 12 (UL and DL)
|
|||
TBF[23] class 12 reserves .....DDC
|
||||
TBF[24] class 12 reserves ...DCD..
|
||||
TBF[25] class 12 reserves .....DCD
|
||||
TBF[26] class 12 reserves ...CD...
|
||||
TBF[27] class 12 reserves .....DDC
|
||||
TBF[26] class 12 reserves ...DDCD.
|
||||
TBF[27] class 12 reserves ....DDDC
|
||||
TBF[28] class 12 reserves ...CD...
|
||||
TBF[29] class 12 reserves ...DDC..
|
||||
Successfully allocated 30 UL TBFs
|
||||
TBF[29] class 12 reserves ...CD...
|
||||
TBF[30] class 12 reserves ...CD...
|
||||
TBF[31] class 12 reserves ...CD...
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm B class 1-12 (UL and DL)
|
||||
TBF[0] class 1 reserves ...C....
|
||||
TBF[1] class 2 reserves ....DC..
|
||||
|
@ -8748,7 +8752,12 @@ Going to test assignment with many TBF, algorithm B class 1-29 (UL and DL)
|
|||
TBF[24] class 25 reserves ....DDCD
|
||||
TBF[25] class 26 reserves ...DCDD.
|
||||
TBF[26] class 27 reserves ....DCDD
|
||||
Successfully allocated 27 UL TBFs
|
||||
TBF[27] class 28 reserves ...DDDDC
|
||||
TBF[28] class 29 reserves ...DDDDC
|
||||
TBF[29] class 1 reserves ...C....
|
||||
TBF[30] class 2 reserves ......DC
|
||||
TBF[31] class 3 reserves ...C....
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm A (DL and UL)
|
||||
TBF[0] class 1 reserves ...C....
|
||||
TBF[1] class 1 reserves ....C...
|
||||
|
@ -8799,7 +8808,24 @@ Going to test assignment with many TBF, algorithm B class 10 (DL and UL)
|
|||
TBF[12] class 10 reserves ...DCD..
|
||||
TBF[13] class 10 reserves .....DCD
|
||||
TBF[14] class 10 reserves ...DCD..
|
||||
Successfully allocated 15 UL TBFs
|
||||
TBF[15] class 10 reserves ...DDCD.
|
||||
TBF[16] class 10 reserves ...DDCD.
|
||||
TBF[17] class 10 reserves ...DDCD.
|
||||
TBF[18] class 10 reserves ...DDCD.
|
||||
TBF[19] class 10 reserves ...DDCD.
|
||||
TBF[20] class 10 reserves ...DDCD.
|
||||
TBF[21] class 10 reserves .....DDC
|
||||
TBF[22] class 10 reserves .....DDC
|
||||
TBF[23] class 10 reserves .....DDC
|
||||
TBF[24] class 10 reserves .....DDC
|
||||
TBF[25] class 10 reserves .....DDC
|
||||
TBF[26] class 10 reserves ...CD...
|
||||
TBF[27] class 10 reserves .....DDC
|
||||
TBF[28] class 10 reserves ...CD...
|
||||
TBF[29] class 10 reserves ...CD...
|
||||
TBF[30] class 10 reserves .....DDC
|
||||
TBF[31] class 10 reserves ...CD...
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm A (DL after UL)
|
||||
TBF[0] class 1 reserves ...C....
|
||||
TBF[1] class 1 reserves ....C...
|
||||
|
@ -8929,11 +8955,13 @@ Going to test assignment with many TBF, algorithm B class 10 (UL after DL)
|
|||
TBF[23] class 10 reserves .......U
|
||||
TBF[24] class 10 reserves ....U...
|
||||
TBF[25] class 10 reserves ......U.
|
||||
TBF[26] class 10 reserves ...U....
|
||||
TBF[27] class 10 reserves .......U
|
||||
TBF[28] class 10 reserves ...U....
|
||||
TBF[29] class 10 reserves .....U..
|
||||
Successfully allocated 30 UL TBFs
|
||||
TBF[26] class 10 reserves .....U..
|
||||
TBF[27] class 10 reserves ...U....
|
||||
TBF[28] class 10 reserves .......U
|
||||
TBF[29] class 10 reserves ...U....
|
||||
TBF[30] class 10 reserves ...U....
|
||||
TBF[31] class 10 reserves ...U....
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm A (UL only)
|
||||
TBF[0] class 1 reserves ...U....
|
||||
TBF[1] class 1 reserves ....U...
|
||||
|
@ -8995,11 +9023,13 @@ Going to test assignment with many TBF, algorithm B class 10 (UL only)
|
|||
TBF[23] class 10 reserves .......U
|
||||
TBF[24] class 10 reserves ....U...
|
||||
TBF[25] class 10 reserves ......U.
|
||||
TBF[26] class 10 reserves ...U....
|
||||
TBF[27] class 10 reserves .......U
|
||||
TBF[28] class 10 reserves ...U....
|
||||
TBF[29] class 10 reserves .....U..
|
||||
Successfully allocated 30 UL TBFs
|
||||
TBF[26] class 10 reserves .....U..
|
||||
TBF[27] class 10 reserves ...U....
|
||||
TBF[28] class 10 reserves .......U
|
||||
TBF[29] class 10 reserves ...U....
|
||||
TBF[30] class 10 reserves ...U....
|
||||
TBF[31] class 10 reserves ...U....
|
||||
Successfully allocated 32 UL TBFs
|
||||
Going to test assignment with many TBF, algorithm A (DL ONLY)
|
||||
TBF[0] class 1 reserves ...C....
|
||||
TBF[1] class 1 reserves ....C...
|
||||
|
|
Loading…
Reference in New Issue