On Thu, 14 Jul 2005, Paul Jackson wrote: > Mel wrote: > > Well, what would people feel is obvious? > > The lines that you (Mel) add that I am puzzling over ways to clarify are > these added lines in gfp.h: > > +#define __GFP_KERNRCLM 0x20000u /* Kernel page that is easily reclaimable */ > +#define __GFP_USERRCLM 0x40000u /* User is a userspace user */ > > +#define __GFP_TYPE_SHIFT 17 /* Translate RCLM flags to array index */ > > and perhaps these added lines in mmzone.h: > > +/* Page allocations are divided into these types */ > +#define ALLOC_TYPES 4 > +#define ALLOC_KERNNORCLM 0 > +#define ALLOC_KERNRCLM 1 > +#define ALLOC_USERRCLM 2 > +#define ALLOC_FALLBACK 3 > + > +/* Number of bits required to encode the type */ > +#define BITS_PER_ALLOC_TYPE 2 > > It didn't jump out at me, first pass, that these two GFP bits > were a 2 bit field, not 2 separate and independent bits. The name > GFP_TYPE_SHIFT is vague. There are some redundant (interdependent) > defines here. > > How about (just brainstorming here) something like the following: > That makes sense to me. Taking into account other threads, attached are patches 01 and 02 from Joels patchset with the different namings and comments. The main changes are the renaming of __GFP_USERRCLM to __GFP_USER to be neutral and comments explaining how the RCLM flags are tied together. Is this any better?