Re: [PATCH 1/9] add defrag flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 26, 2005, at 20:24:08, Dave Hansen wrote:
On Mon, 2005-09-26 at 20:16 -0400, Kyle Moffett wrote:
Uhh, call me crazy, but don't those flags look a little backwards to you? Maybe it's just me, but wouldn't it make sense to expect __GFP_USER to be a userspace allocation and __GFP_KERNRCLM to be an easily reclaimable kernel page?

I think Joel simply made an error in his description.

__GFP_KERNRCLM corresponds to pages which are kernel-allocated, but have some chance of being reclaimed at some point. Basically, they're things that will get freed back under memory pressure. This can be direct, as with the dcache and its slab shrinker, or more indirect as for control structures like buffer_heads that get reclaimed after _other_ things are freed.

Ok, well he should fix both that description and the comment in his patches, and make sure that the code actually matches what it says:

+#define __GFP_USER 0x40000u /* Kernel page that is easily reclaimable */
+#define __GFP_KERNRCLM    0x80000u /* User is a userspace user */

Cheers,
Kyle Moffett

--
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
  -- Brian Kernighan


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux