[lkml]   [2004]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] bitmap parsing routines, version 3
    > On reflection, I reverse my position -- this should really be done in
    > bitmap_clear et all as an attribute of bitmaps in general,

    You're right. Good point.

    Having the various bitop routines cease treating the unused high bits as
    a garbage dump is a separate task. I don't like the way it is, as it
    seems to open the door for some random bugs, in case some hapless code
    is depending on these high bits in ways it shouldn't.

    This whole mechanism seems to have a design confusion - whether to
    specify and honor a specific bit count, or not.

    My preference would have been to have these masks be officially some
    multiple of "unsigned long" words; but instead we have ended up with a
    data type that is ill-defined. Sometimes it honors bit counts, and
    sometimes it doesn't. Some calls take a bit count (and may or may not
    behave predictably in handling the high bits in the last word above the
    count); some don't even admit of a bit count argument. In some ways, it
    is supposed to be just a hidden internal implementation detail that
    these masks are an array of unsigned longs. But some ops leave garbage
    in the "unused" high bits, and some ops react to these high bits.

    As one example, the CPU_MASK_ALL initializer (the cpumask_t type sits on
    these masks) sets exactly NR_CPUS bits on small systems, but some
    multiple of 8*sizeof(unsigned long) bits on large systems (masks more
    than one word).

    We're cruising for a bruising; but I lack the clarity of vision and
    energy to remedy the situation.

    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <> 1.650.933.1373
    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:00    [W:0.021 / U:4.264 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site