Re: [patch 3/6] mempolicy: add MPOL_F_STATIC_NODES flag

From: Paul Jackson
Date: Tue Feb 26 2008 - 16:39:56 EST


David wrote:
> No reader is going to understand immediately what 'mode', 'mode_flags',
> and 'flags' are if you only provide a single line of the code like that.

Duh - of course not. I only presented that line to demonstrate that all
three words 'mode', 'mode_flags', and 'flags' appeared in the same context.

> It becomes rather obvious what they represent when you read the entire
> sys_mbind() implementation,

How about picking less vacuous names than variations of mode and flag,
so that it's easier for the reader to distinguish without having to
read and understand an entire chunk of code first.

> This is a natural implementation detail to accomodate your insistance

My patch for this had explicit bit fields, which made the names clearer:

+ int mask_opts_rel:1; /* c.original_mask is relative */
+ int mask_opts_abs:1; /* c.original_mask is absolute */
+ /* if neither rel nor abs, then use c.latest_cpuset_mask */

You chose not to do that, which obfuscates what's going on.
Don't blame me that the result is obfuscated.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.940.382.4214
--
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/