[Intel-xe] [PATCH 1/6] drm/xe/bo: Don't limit the TT manager to half of system memory

Souza, Jose jose.souza at intel.com
Fri Jun 16 22:18:09 UTC 2023


On Fri, 2023-06-16 at 15:09 +0000, Matthew Brost wrote:
> On Fri, Jun 16, 2023 at 11:54:59AM +0200, Thomas Hellström wrote:
> > TTM enforces this limit a page-allocation time, swapping out TT memory
> > if needed.
> > 
> > Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_ttm_sys_mgr.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
> > index 3e1fa0c832ca..961bbc29dcdf 100644
> > --- a/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
> > +++ b/drivers/gpu/drm/xe/xe_ttm_sys_mgr.c
> > @@ -106,8 +106,6 @@ int xe_ttm_sys_mgr_init(struct xe_device *xe)
> >  
> >  	si_meminfo(&si);
> >  	gtt_size = (u64)si.totalram * si.mem_unit;
> > -	/* TTM limits allocation of all TTM devices by 50% of system memory */
> > -	gtt_size /= 2;

This is going to cause regressions on Mesa.

I remember getting OOM killer when trying to allocate more than half of available RAM.
With this limit something in TTM would just reject the allocation and we don't get OOM killer.


> 
> While we are here, s/gtt_size/sys_size? Can be done in follow up /
> different patch.
> 
> This patch LGTM. With that:
> Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> 
> >  
> >  	man->use_tt = true;
> >  	man->func = &xe_ttm_sys_mgr_func;
> > -- 
> > 2.40.1
> > 



More information about the Intel-xe mailing list