Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
What the hell does GFP stand for?
What is the meaning of GFP
Posted Mar 26, 2008 5:42 UTC (Wed) by pr1268 (subscriber, #24648)
My guess is "Get Free Page" (with various qualifier suffixes, i.e. GFP_KERNEL, GFP_ATOMIC, GFP_DMA, etc.).
It's strange that, after nearly an hour of grepping files throughout the entire Linux source tree, I was unable to come up with a meaning. My search took me all over the mm/, include/linux/, Documentation/, and kernel/ directories, but to no avail. The meaning of GFP_KERNEL via a Google search (going five pages deep) was equally elusive!
I suppose there are many kernel developers out there who know its true meaning whilst snickering over my frustrated search...
Posted Mar 26, 2008 8:55 UTC (Wed) by dale77 (guest, #1490)
Oops. But that is the guy who wrote about that in_atomic ref. Perhaps we need another opinion
Just kidding. Keep up the good work corbet.
Get Free Page
Posted Mar 26, 2008 10:02 UTC (Wed) by pr1268 (subscriber, #24648)
I was right! And to think I extrapolated "get free page" from the context of where I found a bunch of GFP_* macros in my search. Thank you, Dale77.
For those with further interest, the GFP_* macros appear to be a set of bitmasks, many of which are defined as bitwise-ORed versions of others (ref. <Linux source>/include/kernel/gfp.h). These are used to set parameters to allocating virtual memory (and what to do in case of failure). But, I'm certain a lot of LWN readers already know this.
I have a lot to learn about the internal workings of the Linux kernel, as well as my online search skills--I'm certain a search here at LWN would have led me to that link.
Posted Mar 26, 2008 12:08 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246)
Posted Mar 31, 2008 7:43 UTC (Mon) by jengelh (subscriber, #33263)
Well on Windows you get General Protection Faults, in Linux it must therefore be General Fault
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds