why does the function page_to_nid always return zero?
From: Hua Feijun (hua.feijun_at_gmail.com)
Date: 11/30/05
- Previous message: Trond Myklebust: "Re: NFS cache consistancy appears to be broken..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Nov 2005 15:36:21 +0800 To: linux-kernel@vger.kernel.org
Hi everybody:
Tthe following code deoes not work under linux/em64t, and the function
page_to_nid always return zero.Who can tell me the answer to the
problem?
Any advice will be appreciated sincerely.Thanks!!!
pgd = pgd_offset(mm, vaddr);
if (pgd == NULL) {
return -1;
}
pmd = pmd_offset(pgd, vaddr);
if (pmd == NULL) {
return -2;
}
pte = pte_offset_map(pmd, vaddr);
PDEBUG("pte=%ul\n", pte->pte);
if (pte == NULL) {
return -3;
}
return page_to_nid (page);
if (pte_present(*pte) == NULL) {
return -4;
}
page = pte_page(*pte);
pte_unmap(pte);
return page_to_nid(page);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Trond Myklebust: "Re: NFS cache consistancy appears to be broken..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [PATCH 1/5] Light Fragmentation Avoidance V20: 001_antidefrag_flags
... it a file or swap) or cleaning the buffers and discarding. ... +#define alloc_zeroed_user_highpage(vma,
vaddr) \ ... static inline struct page * ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel) - [PATCH 1/5] Light fragmentation avoidance without usemap: 001_antidefrag_flags
... it a file or swap) or cleaning the buffers and discarding. ... +#define alloc_zeroed_user_highpage(vma,
vaddr) \ ... static inline struct page * ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel) - [RFC: 2.6 patch] unexport kmap_{pte,port}
... kernel. ... Is this patch correct? ... pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr),
), ) ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [2.6 patch] unexport kmap_{pte,port} on !ppc
... kernel. ... This patch was already sent on: ... pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr),
), ) ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [vm] PA-RISC io_remap_page_range() compilefix
... -#define io_remap_page_range(vma, vaddr, paddr, size, prot) ... send
the line "unsubscribe linux-kernel" in ... (Linux-Kernel)