linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Question/clarification on pmd accessors
@ 2014-11-02 13:48 Aneesh Kumar K.V
  2014-11-03  0:44 ` Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2014-11-02 13:48 UTC (permalink / raw)
  To: David Miller, Andrea Arcangeli, Benjamin Herrenschmidt
  Cc: linux-arch, linux-mm@kvack.org


Hi Andrea,

This came up when I was looking at how best we can implement generic GUP
that can also handle sparc usecase. Below are the pmd accessors that
would be nice to get documented. 

pmd_present():
        I guess we should return true for both pointer to pte page and
        huge page pte (THP and explicit hugepages). We will always find
        THP and explicit hugepage present. If so how is it
        different from pmd_none() ? (There is an expection of
        __split_huge_page_map marking the pmd not
        present. Should pmd_present() return false in that case ?)

pmd_none():
        In some arch it is same as !pmd_present(). I am
        not sure that is correct. Can we explain the difference between
        !pmd_present and pmd_none ?

pmd_trans_huge():
        pmd value that represent a hugepage built via THP mechanism.
        Also implies present.

pmd_huge():
        Should cover both the THP and explicit hugepages

pmd_large():
        This is confusing. On ppc64 this one also check for
        _PAGE_PRESENT. I don't recollect how we end up with that.

-aneesh

        

        

        

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2014-11-03  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 13:48 Question/clarification on pmd accessors Aneesh Kumar K.V
2014-11-03  0:44 ` Andrea Arcangeli

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