From: Eric Anholt <eric@anholt.net>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Dave Airlie <airlied@gmail.com>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Export kmap_atomic_pfn for DRM-GEM.
Date: Tue, 23 Sep 2008 09:32:42 -0700 [thread overview]
Message-ID: <1222187562.4424.47.camel@vonnegut.anholt.net> (raw)
In-Reply-To: <200809221059.54779.jbarnes@virtuousgeek.org>
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
On Mon, 2008-09-22 at 10:59 -0700, Jesse Barnes wrote:
> On Wednesday, August 27, 2008 5:22 pm Nick Piggin wrote:
> > > However, when other DRM drivers get around to doing memory management,
> > > I'm sure they'll also be interested in an ioremap_wc that doesn't eat
> > > ipi costs. For us, the ipis for flushing were eating over 10% of CPU
> > > time. If your patch series cuts that cost, we could drop this piece at
> > > that point.
> >
> > It can cut the cost quite significantly on normal vmap/vunmap loads I
> > tested. Whether it will work as well on your workload, I don't know
> > but I would have liked to find out. I raised this issue quite a while
> > back, so I'm disappointed it had not been tried...
>
> I think Eric has code with the vmap changes now?
>
> Given our discussions at KS/Plumbers would you be ok with acking these
> patches? Or do you want a repost so you can check out the vmap stuff?
>
> After talking a bit more about it, I think we agreed that the ioctl interface
> is actually a better approach then trying to shoehorn this stuff into system
> calls, so aside from the vmap code (which could be done in 2.6.29 or whenever
> the vmap stuff lands) I think this patchset is pretty close to what we want
> in drm-next now...
I've been trying to get a good test of the vmap changes. Unfortunately,
it looks like things have changed in ioremap in the intervening time
between when I last tested and now. I was taking 2.6.27-rc5-mm1 (since
that was the only git tree I found with Nick's changes in it,
unfortunately) and merging our stuff into there then reverting the
kmap_atomic_prot_pfn bit.
However, we've moved from 10% cost in unmapping due to IPIing to a >30%
cost in mapping due to change_page_attr. This is regardless of whether
I do ioremap or ioremap_wc. The physical range is covered by a WC MTRR,
and the X Server's mapping the memory using the _wc resource. In the
DRM, I just tried moving every ioremap to _wc, and it's the same. The
call chain looks like
i915_gem_pwrite_ioctl (60%)
ioremap_wc (39%)
ioremap_nocache (39%)
ioremap_caller (39%)
ioremap_change_attr (36%)
_set_memory_uc (36%)
change_page_attr_set_clr (36%)
vm_unmap_aliases (31%)
Maybe if I go back and generate a tree of just Nick's changes and try to
merge them forward I can get a good test. However, it looks to me like
we've got some serious brokenness in ioremap and attribute handling
coming up.
--
Eric Anholt
eric@anholt.net eric.anholt@intel.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-09-23 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 19:43 [resubmit] Add GEM to i915 DRM driver Eric Anholt
2008-08-26 19:43 ` [PATCH] Export shmem_file_setup for DRM-GEM Eric Anholt
2008-08-26 19:43 ` [PATCH] Export kmap_atomic_pfn " Eric Anholt
2008-08-26 19:43 ` [PATCH] drm: Add GEM ("graphics execution manager") to i915 driver Eric Anholt
2008-08-27 13:36 ` [PATCH] Export kmap_atomic_pfn for DRM-GEM Nick Piggin
2008-08-27 16:52 ` Eric Anholt
2008-08-28 0:22 ` Nick Piggin
2008-09-22 17:59 ` Jesse Barnes
2008-09-23 16:32 ` Eric Anholt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1222187562.4424.47.camel@vonnegut.anholt.net \
--to=eric@anholt.net \
--cc=airlied@gmail.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®