lkml.org 
[lkml]   [2005]   [Oct]   [23]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateSun, 23 Oct 2005 14:49:00 -0700
FromAndrew Morton <>
SubjectRe: [PATCH 7/9] mm: split page table lock
I did the make-it-a-union thing.  Seems OK.

Hugh Dickins <hugh@veritas.com> wrote:
>
> +#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
>  +/*
>  + * We tuck a spinlock to guard each pagetable page into its struct page,
>  + * at page->private, with BUILD_BUG_ON to make sure that this will not
>  + * overflow into the next struct page (as it might with DEBUG_SPINLOCK).
>  + * When freeing, reset page->mapping so free_pages_check won't complain.
>  + */
>  +#define __pte_lockptr(page)	((spinlock_t *)&((page)->private))
>  +#define pte_lock_init(_page)	do {					\
>  +	BUILD_BUG_ON((size_t)(__pte_lockptr((struct page *)0) + 1) >	\
>  +						sizeof(struct page));	\
>  +	spin_lock_init(__pte_lockptr(_page));				\
>  +} while (0)
>  +#define pte_lock_deinit(page)	((page)->mapping = NULL)
>  +#define pte_lockptr(mm, pmd)	({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));})
>  +#else

Why does pte_lock_deinit() zap ->mapping?  That doesn't seem to have
anything to do with anything?

-
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/

\
 
 \ /
  Last update: 2005-10-23 21:52    [from the cache]
©2003-2008