Question on functions related to swapping in pages.

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

 



Hi,

I was looking through UTLD3 and have some queries related the linux
memory management code (kernel 2.6.26)

I need to get a pointer to the task (process) that faulted and needs
to have a page swapped in, so inside the handle_pte_fault()
function I declared "struct task_struct *ptr" and just before
do_swap_page() is called I assign "ptr = current" and do a printk of
ptr->pid.

I repeated the above inside the do_swap_page() function, just before
grab_swap_token() is called.

The question is : is the output of the printk statments as shown above
giving me the correct pid, that is the pid of the task that caused the
major page fault ?

Putting this another way, I need to know if the functions mentioned
above can go to sleep or be blocked i.e. can be preempted ?
Also, how can I know by looking at the kernel code if a function is
preemptible or not ?

Thanks
arn

--
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