* [patch 0/2] reduce agpgart memory allocation time
@ 2008-08-04 6:51 Shaohua Li
2008-08-04 6:53 ` Dave Airlie
0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2008-08-04 6:51 UTC (permalink / raw)
To: lkml; +Cc: airlied, Andrew Morton, Ingo Molnar, Arjan van de Ven
agpgart memory allocation is quite expensive. For each page agpgart
allocated, it changes the page to uc and as result flush tlb/cache for
the page. In my test, Intel Xorg driver takes about 0.2s for a 32M 3D
fb, and the total time for memory allocation is about 0.33s when intel
xorg driver initializes. Below patches fix the gap. It can reduce the
time to 0.03s, so xserver can boot 0.3s faster.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/2] reduce agpgart memory allocation time
2008-08-04 6:51 [patch 0/2] reduce agpgart memory allocation time Shaohua Li
@ 2008-08-04 6:53 ` Dave Airlie
2008-08-04 7:14 ` Shaohua Li
0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2008-08-04 6:53 UTC (permalink / raw)
To: Shaohua Li; +Cc: lkml, Andrew Morton, Ingo Molnar, Arjan van de Ven
On Mon, Aug 4, 2008 at 4:51 PM, Shaohua Li <shaohua.li@intel.com> wrote:
> agpgart memory allocation is quite expensive. For each page agpgart
> allocated, it changes the page to uc and as result flush tlb/cache for
> the page. In my test, Intel Xorg driver takes about 0.2s for a 32M 3D
> fb, and the total time for memory allocation is about 0.33s when intel
> xorg driver initializes. Below patches fix the gap. It can reduce the
> time to 0.03s, so xserver can boot 0.3s faster.
>
This approach is quite like what was there before, and I think was
objected to on the grounds the caller might forget to
call the flush and leave the system in an inconsistent state.
Personally I've never bought that argument, its not like we have
thousands of users for this API.
I proposed an alternative interface but I failed to get it merged and
ran out of time
http://www.ussg.iu.edu/hypermail/linux/kernel/0804.3/1112.html
I was trying to get the cpa interface to allow arrays of pages to be
passed in, I was then going to change AGP like
http://git.kernel.org/?p=linux/kernel/git/airlied/agp-2.6.git;a=shortlog;h=agp-pageattr2
I really should fix those patches up at some point, feel free to base
a system on those if someone objects to the method with the call site
doing the flush.
Dave.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/2] reduce agpgart memory allocation time
2008-08-04 6:53 ` Dave Airlie
@ 2008-08-04 7:14 ` Shaohua Li
2008-08-04 13:42 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2008-08-04 7:14 UTC (permalink / raw)
To: Dave Airlie; +Cc: lkml, Andrew Morton, Ingo Molnar, Arjan van de Ven
On Mon, 2008-08-04 at 16:53 +1000, Dave Airlie wrote:
> On Mon, Aug 4, 2008 at 4:51 PM, Shaohua Li <shaohua.li@intel.com> wrote:
> > agpgart memory allocation is quite expensive. For each page agpgart
> > allocated, it changes the page to uc and as result flush tlb/cache for
> > the page. In my test, Intel Xorg driver takes about 0.2s for a 32M 3D
> > fb, and the total time for memory allocation is about 0.33s when intel
> > xorg driver initializes. Below patches fix the gap. It can reduce the
> > time to 0.03s, so xserver can boot 0.3s faster.
> >
>
> This approach is quite like what was there before, and I think was
> objected to on the grounds the caller might forget to
> call the flush and leave the system in an inconsistent state.
> Personally I've never bought that argument, its not like we have
> thousands of users for this API.
>
> I proposed an alternative interface but I failed to get it merged and
> ran out of time
> http://www.ussg.iu.edu/hypermail/linux/kernel/0804.3/1112.html
>
> I was trying to get the cpa interface to allow arrays of pages to be
> passed in, I was then going to change AGP like
> http://git.kernel.org/?p=linux/kernel/git/airlied/agp-2.6.git;a=shortlog;h=agp-pageattr2
This is good too.
> I really should fix those patches up at some point, feel free to base
> a system on those if someone objects to the method with the call site
> doing the flush.
Ok, if people object the method, I'll refresh your patches.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/2] reduce agpgart memory allocation time
2008-08-04 7:14 ` Shaohua Li
@ 2008-08-04 13:42 ` Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2008-08-04 13:42 UTC (permalink / raw)
To: Shaohua Li; +Cc: Dave Airlie, lkml, Andrew Morton, Ingo Molnar
On Mon, 04 Aug 2008 15:14:39 +0800
Shaohua Li <shaohua.li@intel.com> wrote:
> >
> > I proposed an alternative interface but I failed to get it merged
> > and ran out of time
> > http://www.ussg.iu.edu/hypermail/linux/kernel/0804.3/1112.html
> >
> > I was trying to get the cpa interface to allow arrays of pages to be
> > passed in, I was then going to change AGP like
> > http://git.kernel.org/?p=linux/kernel/git/airlied/agp-2.6.git;a=shortlog;h=agp-pageattr2
> This is good too.
>
> > I really should fix those patches up at some point, feel free to
> > base a system on those if someone objects to the method with the
> > call site doing the flush.
> Ok, if people object the method, I'll refresh your patches.
>
I much rather have the vector method; with that we can also fold in the
PAT checks into a vectored approach (which saves another 0.3 second)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-04 13:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-04 6:51 [patch 0/2] reduce agpgart memory allocation time Shaohua Li
2008-08-04 6:53 ` Dave Airlie
2008-08-04 7:14 ` Shaohua Li
2008-08-04 13:42 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome