lkml.org 
[lkml]   [2005]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Patch 2/6 introduce helper infrastructure
From
Date
On Thu, 2005-01-27 at 13:27 +0100, Andi Kleen wrote:
> I guess the per MM prng would be still faster, but it's probably
> not worth tweaking unless it shows up as a problem.
>
> > + if (end <= start + len)
> > + return 0;
> > + return PAGE_ALIGN(get_random_int() % range + start);
>
> Division through variable is often quite slow, it would be good if you
> avoided it somehow.

it'll be used once per exec() so while you're right I'll not be a huge
problem; rewriting the implementation of this function ought to be
independent of the (later to be introduced) users, the problem is quite
well defined.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.077 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site