public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Folkert van Heusden <folkert@vanheusden.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Subject: Re: [PATCH] random : prefetch the whole pool, not 1/4 of it
Date: Sat, 30 Jul 2005 23:32:20 +0200	[thread overview]
Message-ID: <20050730213220.GL14975@vanheusden.com> (raw)
In-Reply-To: <42E95B83.8070006@cosmosbay.com>

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

> Could you check this patch and apply it ?
> [RANDOM] : prefetch the whole pool, not 1/4 of it,
>            (pool contains u32 words, not bytes)
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

> --- linux-2.6.13-rc3/drivers/char/random.c	2005-07-13 06:46:46.000000000 +0200
> +++ linux-2.6.13-rc3-ed/drivers/char/random.c	2005-07-29 00:11:24.000000000 +0200
> @@ -469,7 +469,7 @@
>  	next_w = *in++;
>  
>  	spin_lock_irqsave(&r->lock, flags);
> -	prefetch_range(r->pool, wordmask);
> +	prefetch_range(r->pool, wordmask*4);

Isn't it cleaner to replace the line above with:
+	prefetch_range(r->pool, wordmask * sizeof(__u32));
as the pool contains u32 words?

>  	input_rotate = r->input_rotate;
>  	add_ptr = r->add_ptr;
>  



Folkert van Heusden

-- 
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
--------------------------------------------------------------------
Get your PGP/GPG key signed at www.biglumber.com!
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 282 bytes --]

      parent reply	other threads:[~2005-07-30 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 21:20 [PATCH] update maintainer for /dev/random Matt Mackall
2005-07-28 22:26 ` [PATCH] random : prefetch the whole pool, not 1/4 of it Eric Dumazet
2005-07-28 22:31   ` Matt Mackall
2005-07-30 21:32   ` Folkert van Heusden [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=20050730213220.GL14975@vanheusden.com \
    --to=folkert@vanheusden.com \
    --cc=dada1@cosmosbay.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