Re: [PATCH] intel-gpu-tools: skip gem_mmap_offset_exhaustion on Android

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] On Behalf Of Daniel
> Vetter
> Sent: Friday, July 25, 2014 10:07 AM
> To: Gore, Tim
> Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; daniel.vetter@xxxxxxxx
> Subject: Re: [PATCH] intel-gpu-tools: skip gem_mmap_offset_exhaustion on
> Android
> 
> On Fri, Jul 25, 2014 at 10:00:19AM +0100, tim.gore@xxxxxxxxx wrote:
> > From: Tim Gore <tim.gore@xxxxxxxxx>
> >
> > gem_mmap_offset_exhaustion relies on purgeable memory allocations
> > getting swapped out, freeing up physical memory for further
> > allocations. On Android we have no swap partition so this cannot
> > happen and the test gets killed by the low memory killer before mmap
> > offset exhaustion can happen, thus defeating the tests purpose.
> >
> > Signed-off-by: Tim Gore <tim.gore@xxxxxxxxx>
> 
> 
> 
> 	/* we happily leak objects to exhaust mmap offset space, the kernel
> will
> 	 * reap backing storage. */
> 	gem_madvise(fd, handle, I915_MADV_DONTNEED);
> 
> There's really no way you should be able to run out of memory. I suspect
> android kernel's will fall over even with swap.
> -Daniel
> 
Well, not sure I fully understand how GEM works, but I can clearly see the free memory
Shrinking until the OOM killer steps in. Since the bo's are not destroyed, surely the only
Way for the physical memory to be reclaimed is if it gets swapped out, which Android
Wont do. Perhaps I misunderstand "purgeable". Should kswapd free such memory?
  Tim

> > ---
> >  tests/gem_mmap_offset_exhaustion.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/tests/gem_mmap_offset_exhaustion.c
> > b/tests/gem_mmap_offset_exhaustion.c
> > index 914fe6e..016143d 100644
> > --- a/tests/gem_mmap_offset_exhaustion.c
> > +++ b/tests/gem_mmap_offset_exhaustion.c
> > @@ -77,6 +77,10 @@ igt_simple_main
> >  {
> >  	int fd, i;
> >
> > +#ifdef ANDROID
> > +	igt_skip("Test not valid on Android\n"); #endif
> > +
> >  	igt_skip_on_simulation();
> >
> >  	fd = drm_open_any();
> > --
> > 1.9.2
> >
> 
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux