From: Jeff H. <jha...@ad...> - 2003-01-18 02:16:27
|
> -----Original Message----- > From: dri...@li... > [mailto:dri...@li...]On Behalf Of Ian Romanick > Sent: Friday, January 17, 2003 7:12 PM > To: DRI developer's list > Subject: Re: [Dri-devel] The next round of texture memory management... > > [snip] > > Also, using an age variable leads to lots of other really > difficult issues, > > like what happens when it wraps around. A clock algorithm (as it was > > called in my undergraduate courses, anyway) for paging out > would probably > > be better. > > I think we're running into some terminology problems here. In the > existing memory manager, the age is a "when was it last used" variable. > In the new proposals, the age is a fence. There are still wrap-around > issues. :( Actually if it is a straight monotonically increasing unsigned 32-bit counter we can do the signed comparision: (s32)current_age_counter - (s32)buffer_age < 0 Just like the code in the linux kernel that does signed compares to deal with timer wraps. [snip] > Putting some stuff in the kernel is fine as long as we don't rely on > exotic, Linux-specific in-kernel interfaces. Putting too heavy of a > reliance on the new Linux AGPGART or on specifics of the Linux VM are > likely to get us in trouble. > > It will also make it more difficult to port to other systems. This > might be a good time to look at what some of our kernel issues are. I > seem to remember a thread about porting the DRM to Solaris that > ultimately led to despair. :( It is always a balance, putting things in the kernel and userspace. I'm fairly confident we will need some kernel support for this project, if we want to acheive our goal. I think we will try and keep the requirements on the kernel well defined though, and not too exotic. Perhaps too we will allow some/most of the benefits of the code to run on some operating systems, while we get full usage only on systems that support certain features we need. As the system gets designed I suppose we will just have to try and keep these issues in mind I guess. -Jeff |