Re: [PATCH v5 12/17] mm: Add pt_mm to struct page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/2018 08:33 PM, Matthew Wilcox wrote:
> From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> 
> x86 overloads the page->index field to store a pointer to the mm_struct.

Maybe start the sentence with "For page table pages, ..." or "For pgd
page table pages, ..." ?

> Rename this to pt_mm so it's visible to other users.
> 
> Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>

Also a suggestion below, otherwise:

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

>  static void pgd_ctor(struct mm_struct *mm, pgd_t *pgd)
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 90a6dbeeef11..5a519279dcd5 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -139,7 +139,7 @@ struct page {
>  			unsigned long _pt_pad_1;	/* compound_head */
>  			pgtable_t pmd_huge_pte; /* protected by page->ptl */
>  			unsigned long _pt_pad_2;	/* mapping */
> -			unsigned long _pt_pad_3;
> +			struct mm_struct *pt_mm;

Add comment that it's x86-only so somebody doesn't try to write a
generic code expecting it?

>  #if ALLOC_SPLIT_PTLOCKS
>  			spinlock_t *ptl;
>  #else
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux