lkml.org 
[lkml]   [2008]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 3/5] pagemap: Make pagemap_read enforce reading in multiples of 8
    From
    Date

    On Thu, 2008-06-05 at 12:05 -0400, Thomas Tuttle wrote:
    > On Thu, Jun 5, 2008 at 12:03 PM, Matt Mackall <mpm@selenic.com> wrote:
    > >
    > > On Thu, 2008-06-05 at 11:06 -0400, Thomas Tuttle wrote:
    > >> Since kpagecount and kpageflags require reads in multiples of 8, and
    > >> it simplifies add_to_pagemap significantly, I added the same
    > >> requirement to /proc/pid/pagemap.
    > >
    > > I'm generally fine with this. Another approach that's perhaps more
    > > friendly is when someone tries to do a 24-byte read, do a 16-byte read,
    > > leaving the file pointer aligned. Not sure if that's completely kosher
    > > though.
    >
    > This doesn't require that they read exactly 8 bytes, just that they
    > read some multiple of 8 bytes. (They can read 8, 16, 24, etc..., just
    > not something like 12.)

    Yes, I got that, I'm just mathematically impaired this morning. Read
    that as "when someone tries to do a *20* byte read, do a 16-byte read.."
    In other words, round down to the nearest multiple of 8.

    --
    Mathematics is the supreme nostalgia of our time.



    \
     
     \ /
      Last update: 2008-06-05 18:13    [W:2.603 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site