linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: linux-mm <linux-mm@kvack.org>
Cc: aarcange <aarcange@redhat.com>
Subject: wait_split_huge_page() dependence on rmap.h
Date: Mon, 31 Jan 2011 15:31:15 -0800	[thread overview]
Message-ID: <1296516675.7797.5110.camel@nimitz> (raw)

wait_split_huge_page() is really only used in a few spots at the moment.
I was trying to use it in fs/proc/task_mmu.c, but simply including
huge_mm.h gets this:

fs/proc/task_mmu.c: In function a??smaps_pte_rangea??:
fs/proc/task_mmu.c:392: error: dereferencing pointer to incomplete type

I think it's due to the __anon_vma dereference below.  #including rmap.h
makes it go away, but I don't think it's really the correct thing to do
here.  Directly including rmap.h in huge_mm.h ends up with some really
interesting header dependencies and does not work either.

Any ideas?  Should we move the existing huge_mm.h stuff to a private
header and have a more public one that also brings in rmap.h?

#define wait_split_huge_page(__anon_vma, __pmd)                         \
        do {                                                            \
                pmd_t *____pmd = (__pmd);                               \
                spin_unlock_wait(&(__anon_vma)->root->lock);            \
                /*                                                      \
                 * spin_unlock_wait() is just a loop in C and so the    \
                 * CPU can reorder anything around it.                  \
                 */                                                     \
                smp_mb();                                               \
                BUG_ON(pmd_trans_splitting(*____pmd) ||                 \
                       pmd_trans_huge(*____pmd));                       \
        } while (0)


-- Dave

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2011-01-31 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 23:31 Dave Hansen [this message]
2011-01-31 23:41 ` wait_split_huge_page() dependence on rmap.h Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296516675.7797.5110.camel@nimitz \
    --to=dave@linux.vnet.ibm.com \
    --cc=aarcange@redhat.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).