lkml.org 
[lkml]   [2003]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC] frandom - fast random generator module
    Date
    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 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 13:55    [W:0.020 / U:0.108 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site