Ian Romanick a écrit :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There's been quite a bit of discussion about this on #dri-devel the past
few days.  I thought I'd write up a quick summary and post it to the
list.  I know that there are a lot of interested parties that are on the
list, but who don't hang out in #dri-devel. :)

As described in an old message[1], the new memory manager will be
partially in the kernel and partially in user space.  The discussions in
IRC have focused on the interface between the two.  Listed below are the
functions that have been discussed.  The names are just made up.

initialize_pool - Initialze a new memory pool.  This will be called once
for each memory pool (e.g., on-card, AGP, PCI, etc.).

get_pool_state - When a new process starts up it needs to know the state
of a pool.  That is, it needs to know which regions are allocated or not
allocated.  Since all allocations / frees are written to a log that is
stored in a circular buffer, it is possible for the log to wrap around
between times when a given processes the log.  In that case the process
will also need to use this function.

force_log_update - The kernel updates its view of memory periodically
when processes call into it.  It is possible (though very unlikely) that
a process could wrap the log between these occurances.  The process can
detect this and, before wrapping the log, call this function so that the
kernel can update its view of memory.

backup_region - Regions can be marked with a "preserve" bit.  This means
that the contents have to be saved before the memory can be reclaimed.
backup_region instructs the kernel to do this for a specified portion of
a region.

restore_region - Restores the contents of a previously backed-up region
to a new location.  Depending on how backup_region is implemented, this
function may not be necessary.

As you said on IRC, this might not be needed.

alloc_id_block - Each region is tracked by a unique ID.  This function
allocates a block of these IDs to a process.  They will be automatically
reclaimed if the process dies.

release_id_block - Releases a block of previously allocated IDs.

Now, there is one question that sounds to me like it will have implications over the whole memory manager design : do we want to enforce video memory ownership ?

Stephane




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to