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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

