How to find the kernel context and kmalloc()

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

 



Is there any way to find out whether the current code is being executed
on behalf of any process, or whether it has been called from an interrupt?

Can any such information be found out from the "current" task_struct 
structure? How would the current->pid field be relevant in this context?


If all this can be done, then why do we have to worry about GFP_KERNEL 
and GFP_ATOMIC in all our kmallocs? (sigh)

Couldn't this have  been solved within kmalloc() itself? (I think I have 
answered my own question)

Thanks,
  Sandip

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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