[lkml]   [2004]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: lowmem_reserve (replaces protection)
    On Tue, Oct 26, 2004 at 01:48:02PM +1000, Nick Piggin wrote:
    > I see classzone_idx snuck in, can we leave that as alloc_type please?

    when I wrote that code in 2.4 it was called class_idx. Just to show it
    was not an opaque type, in this 2.6 I called it classzone_idx but it's
    the same as class_idx. If you feel classzone_idx is too long I'm sure
    fine to rename to class_idx like plain 2.4.

    The reason I renamed it is that alloc_type tells nothing to who's
    reading the code. That value in the opaque "alloc_type" variable, is
    really the classzone_idx that identify the classzone we have to allocate
    memory from. Classzone 2 means "all ram is good", classzone 2 means
    "zone-normal + zone-dma is good", classzone 0 means "zone-dma is good".

    alloc_type means very very little to me, calling it with a meaningful
    name made the code more readable for me. gfp_mask describes other alloc
    types as well that are not less singificant than the classzone_idx, so I
    don't see why we should go back to the opaque variable name when we can
    have a more descriptive one.

    I'm not going to nitpick further on this detail though, all I care about
    is the asm generated and not breaking ABIs with userspace (i.e. at least
    one forced rename to the sysctl).

    thanks for the review!
    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 14:07    [W:0.019 / U:125.196 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site