Re: [PATCH] Fix find busiest queue 2.6.0-test9

From: Martin J. Bligh
Date: Sun Nov 09 2003 - 15:40:28 EST


>> +/*
>> + * macro to make the code more readable - this_rq->prev_cpu_load[i]
>> + * is our local cached value of i's prev cpu_load. However, putting
>> + * this_rq->prev_cpu_load into the code makes it read like it's the
>> + * prev_cpu_load of this_cpu, which makes it confusing to read
>> + */
>> +#define prev_cpu_load_cache(cpu) (this_rq->prev_cpu_load[cpu])
>
> Ouch, the implicit "this_rq" is really evil ;) Eventually:

Yeah, I know, but ...

># define prev_cpu_load_cache(rq, cpu) (rq->prev_cpu_load[cpu])

I think the implicit version is clearer to read. Oh well, maybe a good
balance between readability and sheer evil ;-)

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/