Re: Regarding the gfp mask "GFP_NOFS"

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

 



> But I could not understand why and how could a filesystem request be
> initiated in order to free memory (the case avoided by GFP_NOFS)?

Not really sure, but I have an idea. What if the memory block you want
to free is currently swapped out? Thus at least, you need to mark the
related swap slot(s) as "free", right? In other word, it will generate
some I/Os, although not too much.

Thank for replying ... but sorry, I could not get you. The flag
GFP_NOFS is sent to kmalloc() to indicate that if no memory is
available, it should not initiate any filesystem IO, however it is
allowed to initiate Disk IO.

So if some memory needs to be swapped out to disk (in order to free
memory that can be returned to the process calling kmalloc), I
understand Disk IO should suffice. But my doubt is how can a
filesystem IO help to free memory (so that it can be returned to the
process calling kmalloc)?

Thanks,

Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux