diff options
author | Aravindan Muthukumar <[email protected]> | 2017-11-09 11:15:28 +0530 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2017-11-20 14:52:42 -0800 |
commit | 971b3c019b7309c32048b68f61af03d1ae2b7d10 (patch) | |
tree | 4323fe782f4c81c46ef64557d7136791abd780e1 /docs/features.txt | |
parent | c8417c8d25e57b00e7202908d93e56daf54513af (diff) |
i965: Optimize bucket index calculation
Reducing Bucket index calculation to O(1).
This algorithm calculates the index using matrix method. Assuming
PAGE_SIZE is 4096, matrix arrangement is as below:
1*4096 2*4096 3*4096 4*4096
5*4096 6*4096 7*4096 8*4096
10*4096 12*4096 14*4096 16*4096
20*4096 24*4096 28*4096 32*4096
... ... ... ...
... ... ... ...
... ... ... max_cache_size
From this matrix its clearly seen that every row follows the below way:
... ... ... n
n+(1/4)n n+(1/2)n n+(3/4)n 2n
Row is calculated as log2(size/PAGE_SIZE) Column is calculated as
converting the difference between the elements to fit into power size of
two and indexing it.
Final Index is (row*4)+(col-1)
Tested with Intel Mesa CI.
Improves performance of 3DMark on BXT by 0.705966% +/- 0.229767% (n=20)
v4: Review comments on style and code comments implemented (Ian).
v3: Review comments implemented (Ian).
v2: Review comments implemented (Jason).
Signed-off-by: Aravindan Muthukumar <[email protected]>
Signed-off-by: Kedar Karanje <[email protected]>
Reviewed-by: Yogesh Marathe <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'docs/features.txt')
0 files changed, 0 insertions, 0 deletions