Shameem Ahamed <[email protected]> writes:

> Hi,
>
> Can anyone explain the difference between major and minor page faults.
>
> As far as I know, major page fault follows a disk access to retrieve
> the data. Minor page fault occurs mainly for COW pages. Is there any
> other instances other than COW, where there will be a minor page
> fault. Which kernel function handles the major page fault ?.

Ignoring error cases, arch/x86/mm/fault.c:do_page_fault calls
mm/memory.c:handle_mm_fault and looks for the flags, VM_FAULT_MAJOR or
VM_FAULT_MINOR in the returned value, so the definitive answer is in
how that return value gets set.  The handle_mm_fault value comes from
called function hugetlb_fault or handle_pte_fault (again, ignoring
error conditions).  I'd suggest starting your inquiry by looking at
the logic in handle_pte_fault.

> Also, can anyone please confirm that in 2.6 kernels, page cache and
> buffer cache are normalized ?. Now we have only one cache, which
> includes both buffer cache and page cache.

They were last I heard.  Things move so fast these days that I can't
keep up!  :)

-- 
  Ed Cashin <[email protected]>
  Find experimental aoe Linux driver patches at
  http://coraid.typepad.com/aoe_linux_proving_grounds/


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to