public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] random : prefetch the whole pool, not 1/4 of it
Date: Thu, 28 Jul 2005 15:31:05 -0700	[thread overview]
Message-ID: <20050728223105.GN8074@waste.org> (raw)
In-Reply-To: <42E95B83.8070006@cosmosbay.com>

On Fri, Jul 29, 2005 at 12:26:11AM +0200, Eric Dumazet wrote:
> Hi Matt
> 
> Could you check this patch and apply it ?
> 
> Thank you
> 
> Eric
> 
> [RANDOM] : prefetch the whole pool, not 1/4 of it,
>            (pool contains u32 words, not bytes)

You probably want r->poolinfo->poolwords as wordmask is off by one?
Please use "x * 4" rather than "x*4" too.


> --- 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);
>  	input_rotate = r->input_rotate;
>  	add_ptr = r->add_ptr;
>  


-- 
Mathematics is the supreme nostalgia of our time.

  reply	other threads:[~2005-07-28 22:35 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 [this message]
2005-07-30 21:32   ` Folkert van Heusden

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=20050728223105.GN8074@waste.org \
    --to=mpm@selenic.com \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.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