* wait_split_huge_page() dependence on rmap.h
@ 2011-01-31 23:31 Dave Hansen
2011-01-31 23:41 ` Andrea Arcangeli
0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2011-01-31 23:31 UTC (permalink / raw)
To: linux-mm; +Cc: aarcange
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: wait_split_huge_page() dependence on rmap.h
2011-01-31 23:31 wait_split_huge_page() dependence on rmap.h Dave Hansen
@ 2011-01-31 23:41 ` Andrea Arcangeli
0 siblings, 0 replies; 2+ messages in thread
From: Andrea Arcangeli @ 2011-01-31 23:41 UTC (permalink / raw)
To: Dave Hansen; +Cc: linux-mm
On Mon, Jan 31, 2011 at 03:31:15PM -0800, Dave Hansen wrote:
> 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 like what you're doing eheh ;)
> 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?
Solution:
+#include <linux/rmap.h>
And avoid including an explicit #include huge_mm.h which is never
needed (not even huge_memory.c includes huge_mm.h, rmap.h is all you
need)
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-31 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 23:31 wait_split_huge_page() dependence on rmap.h Dave Hansen
2011-01-31 23:41 ` 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).