Messages in this thread |  | | | Subject | Re: [RFC] Replace the watermark-related union in struct zone with a watermark[] array | | From | Dave Hansen <> | | Date | Thu, 30 Apr 2009 06:48:20 -0700 |
| |
On Thu, 2009-04-30 at 14:35 +0100, Mel Gorman wrote: > I think what you're saying that you'd be ok with > > zone_wmark_min(z) > zone_wmark_low(z) > zone_wmark_high(z) > > and z->pages_mark[WMARK_MIN] = > and z->pages_mark[WMARK_LOW] = > and z->pages_mark[WMARK_HIGH] = > > ? > > Is that a significant improvement over what the patch currently does? To > me, it seems more verbose.
Either way, there are _relatively_ few users. From a quick cscope, it appears setup_per_zone_pages_min() is really the heaviest user assigning them.
Personally, I do like having the 'wmark' or something similar in the function or structure member names. But, I also like having the units in there as well. There's probably not room for both, though. I'm fine with the naming you have above. The only thing I might consider is removing 'zone_' from the function names since it's implied from the variable name:
min_wmark_pages(z)
The 'z->pages_mark[WMARK_*]' form is ugly, but it should be basically restricted to use in setup_per_zone_pages_min(). I think that means we don't need set_foo() functions because of a lack of use sites.
-- Dave
|  |