public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <glisse@freedesktop.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Jerome Glisse <jglisse@redhat.com>, Nick Piggin <npiggin@suse.de>,
	Christoph Lameter <cl@linux-foundation.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.sf.net
Subject: Re: [PATCH] radeon: preallocate memory for command stream parsing
Date: Wed, 24 Jun 2009 10:29:01 +0200	[thread overview]
Message-ID: <1245832141.2408.4.camel@localhost> (raw)
In-Reply-To: <84144f020906231252u5131ffbdk74f06f8a0f692cf9@mail.gmail.com>

On Tue, 2009-06-23 at 22:52 +0300, Pekka Enberg wrote:
> Hi Jerome,
> 
> On Tue, Jun 23, 2009 at 10:46 PM, Jerome Glisse<jglisse@redhat.com> wrote:
> > Command stream parsing is the most common operation and can
> > happen hundred of times per second, we don't want to allocate/free
> > memory each time this ioctl is call. This rework the ioctl
> > to avoid doing so by allocating temporary memory along the
> > ib pool.
> >
> > Signed-off-by: Jerome Glisse <jglisse@redhat.com>
> 
> So how much does this help (i.e. where are the numbers)? I am bit
> surprised "hundred of times per second" is an issue for our slab
> allocators. Hmm?
> 

I didn't have real number but the vmap path was really slower,
quake3 fps goes from ~20 to ~40 on average when going from vmap
to preallocated. When using kmalloc i don't thing there was so
much performance hit. But i think the biggest hit was that in
previous code i asked for zeroed memory so i am pretty sure kernel
spend a bit of time clearing page. I reworked the code to avoid
needing cleared memory and so avoid memset, this is likely why
we get a performance boost.

Cheers,
Jerome


  reply	other threads:[~2009-06-24  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 19:46 [PATCH] radeon: preallocate memory for command stream parsing Jerome Glisse
2009-06-23 19:52 ` Pekka Enberg
2009-06-24  8:29   ` Jerome Glisse [this message]
2009-06-25  7:04     ` Pekka Enberg
2009-06-25  9:03       ` Thomas Hellström
2009-06-25 11:56         ` Jerome Glisse

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=1245832141.2408.4.camel@localhost \
    --to=glisse@freedesktop.org \
    --cc=cl@linux-foundation.org \
    --cc=dri-devel@lists.sf.net \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=penberg@cs.helsinki.fi \
    /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