Re: [PATCH] swiotlb: allocate memory in a cache-friendly way

2021-09-16 Thread Chao Gao
On Thu, Sep 16, 2021 at 11:49:39AM -0400, Konrad Rzeszutek Wilk wrote: >On Wed, Sep 01, 2021 at 12:21:35PM +0800, Chao Gao wrote: >> Currently, swiotlb uses a global index to indicate the starting point >> of next search. The index increases from 0 to the number of slots - 1 >> and then wraps aroun

Re: [PATCH] swiotlb: allocate memory in a cache-friendly way

2021-09-16 Thread Konrad Rzeszutek Wilk
On Wed, Sep 01, 2021 at 12:21:35PM +0800, Chao Gao wrote: > Currently, swiotlb uses a global index to indicate the starting point > of next search. The index increases from 0 to the number of slots - 1 > and then wraps around. It is straightforward but not cache-friendly > because the "oldest" slot

[PATCH] swiotlb: allocate memory in a cache-friendly way

2021-08-31 Thread Chao Gao
Currently, swiotlb uses a global index to indicate the starting point of next search. The index increases from 0 to the number of slots - 1 and then wraps around. It is straightforward but not cache-friendly because the "oldest" slot in swiotlb tends to be used first. Freed slots are probably acce