All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Thomas Tuttle <ttuttle@google.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] pagemap: Make pagemap_read enforce reading in multiples of 8
Date: Thu, 05 Jun 2008 11:09:35 -0500	[thread overview]
Message-ID: <1212682175.3953.169.camel@calx> (raw)
In-Reply-To: <4ca0a85e0806050905j6cf33f3dx9143333aa0a8b6e7@mail.gmail.com>


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.


  reply	other threads:[~2008-06-05 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 15:06 [PATCH 3/5] pagemap: Make pagemap_read enforce reading in multiples of 8 Thomas Tuttle
2008-06-05 16:03 ` Matt Mackall
2008-06-05 16:05   ` Thomas Tuttle
2008-06-05 16:09     ` Matt Mackall [this message]
2008-06-05 16:14       ` Thomas Tuttle
2008-06-05 16:21         ` Matt Mackall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1212682175.3953.169.camel@calx \
    --to=mpm@selenic.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ttuttle@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.