[lkml]   [2003]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] frandom - fast random generator module
On Thursday 16 October 2003 10:22, Eli Billauer wrote:
> (3) I agree with both. And I use /dev/zero a lot. I know how to write a
> zero-generating application in user space.

There is a good reason for this: You can implement pages containing only
zeroes very efficiently in the kernel. You can map pages containing only
zeroes to a single physical page in the kernel (the ZERO_PAGE). You can
ignore the refcounting on this page and save precious cache flushes and
much more by doing this in the kernel.

Compare an application with memset() and mmaping of /dev/zero in
multiple processes, writing to only some of these pages later.

> (4) The module is small: 6kB of source code as a standalone module, and
> 2.3 kB of kernel memory.

That's a price worth as an "default to off" option. We have much more
seldom used stuff in the kernel and maintain it, which is a bigger mess
than this.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:55    [W:0.158 / U:9.936 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site