lkml.org 
[lkml]   [2009]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectttm_mem_global
From
Date
On Wed, 2009-07-22 at 10:37 +0200, Thomas Hellström wrote:
> TTM has a device struct per device and an optional global struct that is
> common for all devices and intended to be per subsystem.
>
> The only subsystem currently having a global structure is the memory
> accounting subsystem:
> struct ttm_mem_global

Thomas i don't think the way we init ttm_mem_global today make
it follow the 1 struct ttm_mem_global for everyone. I think it
should be initialized and refcounted by device struct.

So on first device creation a ttm_mem_global is created and
then anytime a new device is created the refcount of ttm_mem_global
is increased. This would mean some static global refcount inside
ttm_memory.c, maybe there is something similar to singleton in
the linux toolbox.

Thought ? Idea ?

Cheers,
Jerome

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-07-28 18:53    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site