Re: kernel swapping

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

 



Hi!

On 14:03 Wed 14 Jul     , Kulikov Vasiliy wrote:
> Hi folks,
> 
> I wonder whether any kernel code is swapped out in some cases? E.g. in
> windows NT kernel kernel code is divided into two parts - swappable and
> nonswappable, there is specific macros to mark the code being swappable.
> 
> So, as I understand, all kernel code (including modules) and all
> static/global data is unswappable, all dynamic memory allocated with
> GFP_ATOMIC is unswappable, with GFP_KERNEL is swappable. Am I right?

No, GFP_KERNEL is not swappable and I am not aware of any kernel memory which
is. This flag determines the behaviour when allocating memory:

GFP_ATOMIC fail immediately, if no memory is available; This is needed is some
cases where the code cannot sleep (e.g. interrupt context)

GFP_KERNEL put the code to sleep and try to free memory e.g. by swapping user
space memory to disk; However, this does not mean that allocations are always
successful either.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux