linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Pekka Enberg <penberg@kernel.org>,
	David Miller <davem@davemloft.net>,
	marcin.slusarz@gmail.com, mpm@selenic.com,
	linux-kernel@vger.kernel.org, rientjes@google.com,
	linux-mm@kvack.org
Subject: Re: [PATCH] slub: reduce overhead of slub_debug
Date: Fri, 8 Jul 2011 12:41:24 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1107081240010.23187@router.home> (raw)
In-Reply-To: <m2box5cplq.fsf@firstfloor.org>

On Thu, 7 Jul 2011, Andi Kleen wrote:

> Christoph Lameter <cl@linux.com> writes:
>
>
> > +#ifdef __HAVE_ARCH_INV_MEMSCAN
> > +void *inv_memscan(void *addr, int c, size_t size)
> > +{
> > +	if (!size)
> > +		return addr;
> > +	asm volatile("repz; scasb\n\t"
>
> This will just do the slow byte accesses again internally.
> scasb is not normally very optimized in microcode as far
> as I know.
>
> Also rep has quite some startup overhead which makes
> it a bad idea for small sizes (<16-20 or so)
>
> I would stay with the C version. I bet that one is
> faster.

If the c code is such an improvement then memscan and other
implementations can be accellerated in the same way. That would be useful
in general. We can get rid of the implementation for memscan and friends
in x86 arch code.



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-07-08 17:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 19:39 Marcin Slusarz
2011-06-28 19:32 ` Christoph Lameter
2011-06-28 19:40   ` David Daney
2011-06-28 20:58     ` David Rientjes
2011-06-28 21:04       ` Ben Greear
2011-06-28 21:10         ` David Rientjes
2011-06-28 21:16       ` Dave Jones
2011-07-07 18:07 ` Pekka Enberg
2011-07-07 18:17   ` Christoph Lameter
2011-07-07 18:30     ` Ben Greear
2011-07-07 18:42       ` Christoph Lameter
2011-07-07 18:54         ` Ben Greear
2011-07-07 18:30     ` Matt Mackall
2011-07-07 18:52     ` Pekka Enberg
2011-07-07 18:55       ` Matt Mackall
2011-07-07 19:12       ` Christoph Lameter
2011-07-07 19:21         ` David Miller
2011-07-07 19:49           ` Pekka Enberg
2011-07-07 20:12             ` Christoph Lameter
2011-07-08  5:23               ` Andi Kleen
2011-07-08 17:41                 ` Christoph Lameter [this message]
2011-07-08  5:38               ` Pekka Enberg

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=alpine.DEB.2.00.1107081240010.23187@router.home \
    --to=cl@linux.com \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /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