From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1a71e77003b3e1e72f9ae1d4f7a7fb1d@quanstro.net> References: <7d3530220907132223o58711065w5a669c7fd0084e53@mail.gmail.com> <1a71e77003b3e1e72f9ae1d4f7a7fb1d@quanstro.net> Date: Tue, 14 Jul 2009 09:03:35 -0700 Message-ID: <7d3530220907140903j55400f88h77301749c5b50f51@mail.gmail.com> From: John Floren To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] ugliness in vesa Topicbox-Message-UUID: 2023d8ec-ead5-11e9-9d60-3106f5b1d025 On Tue, Jul 14, 2009 at 5:06 AM, erik quanstrom wrot= e: >> I didn't seem to see any improvement after applying the mtrr patch... >> did you make any changes to the vganvidia file before compiling? I >> haven't looked at the 'pat' thing, I'll have to check that out. >> > > for the pat business, i did: > > /n/sources/plan9//sys/src/9/pc/vganvidia.c:371,377 - vganvidia.c:371,377 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(scr->storage <= =3D scr->apsize) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0nv.dmabase =3D (ulong*)((uchar*)scr->vaddr + scr->storage - 128*1= 024); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else{ > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 nv.dmabase =3D (void*)vmap(scr->paddr + scr->storage - 128*1024, 128= *1024); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 nv.dmabase =3D (void*)vmappat(scr->paddr + scr->storage - 128*1024, = 128*1024, PATWT); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if(nv.dmabase =3D=3D 0){ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hwaccel =3D 0; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hwblank =3D 0; > > a quick explainer. =C2=A0the pat patch just keeps a look-aside > table of memory of special types. =C2=A0any time the mmu > code is asked to map that memory, it is mapped with > the special type given. =C2=A0this means that if you wanted > to, for example (the current interface is better than > this unless you want a user-space driver), map pci space > in a segment accessable from user space, you could do > this and you would get the proper NC memory type. > > it's fun when the explination's longer than the code. > > - erik > > I believe I properly applied the pat patch, but I'm not really seeing any improvement. At least, it still takes fully two seconds to bring one large window in front of another. Did you change anything with the nvidia driver when applying the mtrr patch? I was under the impression that the applied patch only affected the vesa driver. John --=20 "I've tried programming Ruby on Rails, following TechCrunch in my RSS reader, and drinking absinthe. It doesn't work. I'm going back to C, Hunter S. Thompson, and cheap whiskey." -- Ted Dziuba