linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Question on follow_page_mask
@ 2016-02-23 13:15 Anshuman Khandual
  2016-02-23 14:03 ` Kirill A. Shutemov
  0 siblings, 1 reply; 5+ messages in thread
From: Anshuman Khandual @ 2016-02-23 13:15 UTC (permalink / raw)
  To: Kirill A. Shutemov, kirill.shutemov, Hugh Dickins
  Cc: Linux PPC dev, Aneesh Kumar K.V

Not able to understand the first code block of follow_page_mask
function. follow_huge_addr function is expected to find the page
struct for the given address if it turns out to be a HugeTLB page
but then when it finds the page we bug on if it had been called
with FOLL_GET flag.

	page = follow_huge_addr(mm, address, flags & FOLL_WRITE);
	if (!IS_ERR(page)) {
		BUG_ON(flags & FOLL_GET);
		return page;
	}

do_move_page_to_node_array calls follow_page with FOLL_GET which
in turn calls follow_page_mask with FOLL_GET. On POWER, the
function follow_huge_addr is defined and does not return -EINVAL
like the generic one. It returns the page struct if its a HugeTLB
page. Just curious to know what is the purpose behind the BUG_ON.
Thank you.

Regards
Anshuman

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-24 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 13:15 Question on follow_page_mask Anshuman Khandual
2016-02-23 14:03 ` Kirill A. Shutemov
2016-02-23 21:07   ` Hugh Dickins
2016-02-24 11:45     ` Anshuman Khandual
2016-02-24 11:22   ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).