[igt-dev] [PATCH i-g-t v14 06/33] lib/intel_allocator_random: Add random allocator

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Jan 15 09:56:48 UTC 2021


On Thu, Jan 14, 2021 at 04:09:40PM +0000, Chris Wilson wrote:
> Quoting Zbigniew Kempczyński (2021-01-14 12:22:06)
> > Sometimes we want to experiment with addresses so randomizing can help
> > us a little.
> 
> We had some discussion on the utility of a random allocator without any
> overlap detection. Useful for some debugging, but brings its own booby
> traps.
> 
> We do need to add comments that discuss the pro/cons of each allocator,
> in particular mentioning that without overlap detection this allocator
> will eventually return conflicting addresses. There's also another
> subtle problem in that an even spread of objects over the address range
> increases mempressure from the page tables, leading to mystery ENOMEM
> from execbuf.
> -Chris

We can add support of detecting overlapping in RANDOM allocator in the
future. At the moment please treat this as experimental and sample 
allocator implementation. 

Regardign page tables and ENOMEM I think BISECT allocator could be 
implemented to expand page tables quickly and consume more memory.

--
Zbigniew


More information about the igt-dev mailing list