[Dri-devel] Re: PPC Lockup (ati-pcigart-branch)

Jeff Hartmann jhartmann at valinux.com
Sat Jan 20 03:48:50 EST 2001


Gareth Hughes wrote:

> Dan Malek wrote:
>
>> Michel Dänzer wrote:
>>
>>> [CC'ing linuxppc-dev, hopefully someone there knows what might be up...]
>>>
>>> This is where it dies:
>>>
>>>         /* FIXME: We should really have a kernel call for this...
>>>          */
>>>         entry->virtual = __vmalloc( (pages << PAGE_SHIFT),
>>>                                     GFP_KERNEL,
>>>                                     PAGE_KERNEL);
>>
>> This isn't very much information, but only one thing can really
>> be wrong........
>>
>> What is the value of 'pages'?  I suspect it is huge (and perhaps
>> wrong).  The GFP_KERNEL flag will cause vmalloc() to wait for pages
>> to become available (i.e. it will swap other things out).  If this
>> value in incorrect, this call will wait forever for pages that are
>> never going to arrive.  Worse, it is going to keep sucking up pages
>> and holding them, so nothing else is going to run either.  Is "pages"
>> really the number of pages, or a size that was never converted to pages?
>
>
> Pages is definitely the number of pages (at least when I wrote the
> code...).

It is definitely the number of pages.  Also this function works
correctly on an ia32, I'll post the file where this code is executed in
case there is a simple error which the PPC people would see.

>
>
>> ...and for the 'FIXME' comment, you want a function that does
>> what? vmalloc?  Why don't you just call it (or one of the more
>> appropriate variants if necessary)?
>
>
> This was originally when I was passing a flag to make the memory
> uncached.  This wasn't needed, and we really should be using
> vmalloc_32(...) instead (which will result in exactly the same code, but
> it is cleaner).

I agree, I haven't gotten around to code cleanup on this branch yet though.

-Jeff
(The function in question is drm_sg_alloc starting on line 64.)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scatter.c
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20010119/15dcb277/attachment.txt>


More information about the Linuxppc-dev mailing list