public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: [PATCH] mm/slab.c : prefetchw the start of new allocated objects
Date: Fri, 29 Jul 2005 11:05:09 +0200	[thread overview]
Message-ID: <42E9F145.7040302@cosmosbay.com> (raw)
In-Reply-To: <20050729014150.6e97dfd2.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

[MM] slab.c : prefetchw the start of new allocated objects

Most of objects returned by __cache_alloc() will be written by the caller,
(but not all callers want to write all the object, but just at the begining)
prefetchw() tells the modern CPU to think about the future writes, ie start
some memory transactions in advance.

Some CPU lacks a prefetchw() and currently do nothing, so I ask this question :
Should'nt make prefetchw() do at least a prefetch() ? A read hint is better than nothing.


Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>


[-- Attachment #2: slab.prefetchw --]
[-- Type: text/plain, Size: 391 bytes --]

diff -Nru linux-2.6.13-rc4/mm/slab.c linux-2.6.13-rc4-ed/mm/slab.c
--- linux-2.6.13-rc4/mm/slab.c	2005-07-29 00:44:44.000000000 +0200
+++ linux-2.6.13-rc4-ed/mm/slab.c	2005-07-29 10:48:45.000000000 +0200
@@ -2166,6 +2166,7 @@
 	}
 	local_irq_restore(save_flags);
 	objp = cache_alloc_debugcheck_after(cachep, flags, objp, __builtin_return_address(0));
+	prefetchw(objp);
 	return objp;
 }
 

  reply	other threads:[~2005-07-29  9:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 23:35 2.6.12 sound problem Stephen Clark
2005-07-27  4:23 ` Lee Revell
2005-07-27 15:31   ` Stephen Clark
2005-07-27  8:26 ` Takashi Iwai
2005-07-27 15:31   ` Stephen Clark
2005-07-29  8:41     ` Andrew Morton
2005-07-29  9:05       ` Eric Dumazet [this message]
2005-07-29  9:17         ` [PATCH] mm/slab.c : prefetchw the start of new allocated objects Andrew Morton
2005-07-29 10:08         ` Ingo Molnar
2005-07-30 19:31         ` David S. Miller
2005-07-30  3:13       ` 2.6.12 sound problem Stephen Clark
2005-07-30 15:56         ` Stephen Clark
2005-07-31 19:25           ` 2.6.13rc4 hang Stephen Clark
2005-08-01 13:11           ` Stephen Clark

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=42E9F145.7040302@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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