All of lore.kernel.org
 help / color / mirror / Atom feed
* significant ioremap leak in i915?
@ 2014-10-12  9:28 Breton M. Saunders
  2014-10-12 10:23 ` Dave Airlie
  0 siblings, 1 reply; 5+ messages in thread
From: Breton M. Saunders @ 2014-10-12  9:28 UTC (permalink / raw)
  To: intel-gfx

Guys,

   This might be covered elsewhere, but help me come up to speed:  I am 
trying to analyze a leak in i915 that occurs on a digital sinage system 
that I've built.  The system basically is doing a lot of 
XCompositeRedirectWindow / glXBindTexImageEXT calls to render web views 
and mplayer output onto opengl textures for subsequent rendering.

   In my testing, I observe that an enormous block is being lost in 
ioremap by looking at /proc/vmallocinfo:

<snip>
0xffffc90000200000-0xffffc90010201000 268439552 
pci_mmcfg_arch_map+0x33/0x90 phys=e0000000 ioremap
<snip>
0xffffc90010f80000-0xffffc90020f81000 268439552 
i915_driver_load+0x20c/0x6d0 [i915] phys=c0000000 ioremap
<snip>

   So in this example 268 megabytes have been lost.

   Now what is even more vexing is if I stop the software, and X11 both 
blocks are still present on the vmalloc list.  If I then proceed to 
rmmod i915 the i915 entry vanishes, however, the pci_mmcfg_arch_map 
mapping remains.

   It is entirely possible that I am doing something stupid from 
userland (opengl) however, my test runs reliably on an NVidia based 
machine - no leaks, runs until I power it off.  I also think that 
whatever wrongness I may be doing in userland I shouldn't be able to 
blow up the system in this way.

   For clarity, my setup is:
      A NUC 2820 (I.e. Haswell N2820 CPU, 2.13GHz).  1Gb physical ram.
      Operating system: Ubuntu 14.04 (as shipped):
        kernel version 3.13.0-37-generic (i.e. Ubuntu's build)
        Xorg: X.Org X Server 1.15.1
                  Intel xorg module: compiled for 1.15.1, module version 
= 2.99.916
                  Acceleration mode: uxa (although SNA shows no 
difference with regards to the leak).

Any suggestions would be welcome on how to address / analyze this - in 
the meantime I will be digging through the i915 source code to try to 
better understand the problem.

Cheers,

     -Brett

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significant ioremap leak in i915?
  2014-10-12  9:28 significant ioremap leak in i915? Breton M. Saunders
@ 2014-10-12 10:23 ` Dave Airlie
  2014-10-12 11:07   ` Breton M. Saunders
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2014-10-12 10:23 UTC (permalink / raw)
  To: Breton M. Saunders; +Cc: intel-gfx

On 12 October 2014 19:28, Breton M. Saunders <brett@mynah-software.com> wrote:
> Guys,
>
>   This might be covered elsewhere, but help me come up to speed:  I am
> trying to analyze a leak in i915 that occurs on a digital sinage system that
> I've built.  The system basically is doing a lot of XCompositeRedirectWindow
> / glXBindTexImageEXT calls to render web views and mplayer output onto
> opengl textures for subsequent rendering.
>
>   In my testing, I observe that an enormous block is being lost in ioremap
> by looking at /proc/vmallocinfo:
>
> <snip>
> 0xffffc90000200000-0xffffc90010201000 268439552 pci_mmcfg_arch_map+0x33/0x90
> phys=e0000000 ioremap
> <snip>
> 0xffffc90010f80000-0xffffc90020f81000 268439552 i915_driver_load+0x20c/0x6d0
> [i915] phys=c0000000 ioremap
> <snip>
>
>   So in this example 268 megabytes have been lost.


This isn't RAM, its address space mapping, its not really a leak at all.

Dave.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significant ioremap leak in i915?
  2014-10-12 10:23 ` Dave Airlie
@ 2014-10-12 11:07   ` Breton M. Saunders
  2014-10-13  1:09     ` Dave Airlie
  0 siblings, 1 reply; 5+ messages in thread
From: Breton M. Saunders @ 2014-10-12 11:07 UTC (permalink / raw)
  To: Dave Airlie; +Cc: intel-gfx

On 12/10/14 11:23, Dave Airlie wrote:
> On 12 October 2014 19:28, Breton M. Saunders <brett@mynah-software.com> wrote:
>> Guys,
>>
>>    This might be covered elsewhere, but help me come up to speed:  I am
>> trying to analyze a leak in i915 that occurs on a digital sinage system that
>> I've built.  The system basically is doing a lot of XCompositeRedirectWindow
>> / glXBindTexImageEXT calls to render web views and mplayer output onto
>> opengl textures for subsequent rendering.
>>
>>    In my testing, I observe that an enormous block is being lost in ioremap
>> by looking at /proc/vmallocinfo:
>>
>> <snip>
>> 0xffffc90000200000-0xffffc90010201000 268439552 pci_mmcfg_arch_map+0x33/0x90
>> phys=e0000000 ioremap
>> <snip>
>> 0xffffc90010f80000-0xffffc90020f81000 268439552 i915_driver_load+0x20c/0x6d0
>> [i915] phys=c0000000 ioremap
>> <snip>
>>
>>    So in this example 268 megabytes have been lost.
>
> This isn't RAM, its address space mapping, its not really a leak at all.
It really doesn't matter whether it is ram or mapping; its a resource 
leak that causes the system to OOM and panic.

     -Brett

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significant ioremap leak in i915?
  2014-10-12 11:07   ` Breton M. Saunders
@ 2014-10-13  1:09     ` Dave Airlie
  2014-10-13  4:58       ` Breton M. Saunders
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2014-10-13  1:09 UTC (permalink / raw)
  To: Breton M. Saunders; +Cc: intel-gfx

>>>    So in this example 268 megabytes have been lost.
>>
>>
>> This isn't RAM, its address space mapping, its not really a leak at all.
>
> It really doesn't matter whether it is ram or mapping; its a resource leak
> that causes the system to OOM and panic.

hey I was trying to help you come up to speed as requested, you don't
have to believe me.

Dave.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: significant ioremap leak in i915?
  2014-10-13  1:09     ` Dave Airlie
@ 2014-10-13  4:58       ` Breton M. Saunders
  0 siblings, 0 replies; 5+ messages in thread
From: Breton M. Saunders @ 2014-10-13  4:58 UTC (permalink / raw)
  To: Dave Airlie; +Cc: intel-gfx

On 13/10/14 02:09, Dave Airlie wrote:
>>>>     So in this example 268 megabytes have been lost.
>>>
>>> This isn't RAM, its address space mapping, its not really a leak at all.
>> It really doesn't matter whether it is ram or mapping; its a resource leak
>> that causes the system to OOM and panic.
> hey I was trying to help you come up to speed as requested, you don't
> have to believe me.
I apologize, and I appreciate your help.

I do believe you.

It also appears that the mapping I jumped on wasn't the root cause of 
the problem; I'm still investigating.

     -Brett

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-13  4:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12  9:28 significant ioremap leak in i915? Breton M. Saunders
2014-10-12 10:23 ` Dave Airlie
2014-10-12 11:07   ` Breton M. Saunders
2014-10-13  1:09     ` Dave Airlie
2014-10-13  4:58       ` Breton M. Saunders

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.