[lkml]   [2008]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 3/6] mempolicy: add MPOL_F_STATIC_NODES flag
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 <> 1.940.382.4214

 \ /
  Last update: 2008-02-26 22:43    [W:0.112 / U:1.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site