lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 4/7] zram/xvmalloc: free bit block insertion optimization
    From
    On Wed, Jan 26, 2011 at 8:40 PM, Robert Jennings <rcj@linux.vnet.ibm.com> wrote:
    > * Pekka Enberg (penberg@kernel.org) wrote:
    >> On Wed, Jan 26, 2011 at 7:25 PM, Robert Jennings <rcj@linux.vnet.ibm.com> wrote:
    >> > There is no need to set the bits in the first- and second-level indices
    >> > to indicate a free page when we know that a free page existed at this
    >> > level.
    >> >
    >> > Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
    >>
    >> Why is it not necessary? I don't know that part of the code well
    >> enough to tell if this patch is safe or not.
    >
    > This change is in a conditional block which is entered only when there is
    > an existing data block on the freelist where the insert has taken place.
    >
    > The new block is pushed onto the freelist stack and this conditional block
    > is updating links in the prior stack head to point to the new stack head.
    > After this conditional block the first-/second-level indices are updated
    > to indicate that there is a free block at this location.
    >
    > This patch adds an immediate return from the conditional block to avoid
    > setting bits again to indicate a free block on this freelist. They would
    > already be set because there was an existing free block on this freelist.

    Some of that information could be put in the changelog.

    Reviewed-by: Pekka Enberg <penberg@kernel.org>


    \
     
     \ /
      Last update: 2011-01-26 19:53    [W:0.021 / U:0.220 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site