"Albert Cahalan" <[EMAIL PROTECTED]> writes: > The cumulative ones are still not justified though, and I fear they > may be 64-bit even on i386.
All the context switch counts are unsigned long. > It turns out that an i386 procps spends > much of its time doing 64-bit division to parse the damn ASCII crap. > I suppose I could just skip those fields, but generating them isn't > too cheap and probably I'd get stuck parsing them for some other > reason -- having them separate is probably a good idea. I can't think of a compelling justification for the cumulative context switch counts. But I suggest that if the cost of exposing these values is low enough, they should be exposed anyway, just for the sake of uniformity (these would be the only two getrusage values not present in /proc/pid/stat). If the decimal representation of values in /proc/pid/stat has such unpleasant overheads, then I wonder if that is something worth fixing, whether the context switch counts are added or not? It occurs to me that it would be easy to add support for a hex version of /proc/pid/stat with very little additional code, by using an alternate sprintf format string in fs/proc/array.c:do_task_stat(). I assume that procps could be adapted quite easily to take advantage of this? David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/