[OT]: Understanding Linux kernel book

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

 



Hi All,

 

In Oreilly book "Understanding Linux kernel", following text written under section "15.1.3.1. Finding a page":

 

"The lock_page( ) function, in turn, blocks the current process if the page is already locked. To that end, it invokes the _ _wait_on_bit_lock( ) function on the PG_locked bit. The latter function puts the current process in the TASK_UNINTERRUPTIBLE state, stores the process descriptor in a wait queue, executes the sync_page method of the address_space object to unplug the request queue of the block device containing the file, and finally invokes schedule( ) to suspend the process until the PG_locked flag of the page is cleared. "

 

The corresponding code in 2.6.16 kernel version:

 

void fastcall __lock_page(struct page *page)

{

        DEFINE_WAIT_BIT(wait, &page->flags, PG_locked);

         __wait_on_bit_lock(page_waitqueue(page), &wait, sync_page, TASK_UNINTERRUPTIBLE);

}

 

I think "stores the process descriptor in a wait queue" should be corrected as "stores the page descriptor in a wait queue"
 
Rgds,
Adil

[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