Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Batch copy_from_user for relocation processing
Date: Mon, 26 Mar 2012 09:59:55 +0200	[thread overview]
Message-ID: <20120326075955.GD4014@phenom.ffwll.local> (raw)
In-Reply-To: <1332619973-5127-1-git-send-email-chris@chris-wilson.co.uk>

On Sat, Mar 24, 2012 at 08:12:53PM +0000, Chris Wilson wrote:
> Originally the code tried to allocate a large enough array to perform
> the copy using vmalloc, performance wasn't great and throughput was
> improved by processing each individual relocation entry separately.
> This too is not as efficient as one would desire. A compromise would be
> to allocate a single page, or to allocate a few entries on the stack,
> and process the copy in batches. The latter gives simpler code and more
> consistent performance due to a lack of heuristic.
> 
> x11perf -copywinwin10:	n450/pnv	i3-330m		i5-2520m (cpu)
>                before: 	  249000	 785000		 1280000 (80%)
>                  page:	  264000	 896000		 1280000 (65%)
>              on-stack:	  264000	 902000		 1280000 (67%)
> 
> v2: Use 512-bytes of stack for batching rather than allocate a page.
> v3: Tidy the code slightly with more descriptive variable names
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
... and also queued up for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

      reply	other threads:[~2012-03-26  7:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24  0:20 [PATCH] drm/i915: Batch copy_from_user for relocation processing Chris Wilson
2012-03-24 12:33 ` Daniel Vetter
2012-03-24 20:09   ` Chris Wilson
2012-03-24 20:12   ` Chris Wilson
2012-03-26  7:59     ` Daniel Vetter [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=20120326075955.GD4014@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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