Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-19 Thread Aneesh Kumar K.V
"Kirill A. Shutemov" writes: > On Sun, May 18, 2014 at 07:45:59PM -0400, Matthew Wilcox wrote: >> On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: >> > Below is my attempt to play with the problem. I've took one function -- >> > page_referenced_one() -- which looks ugly

Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-19 Thread Aneesh Kumar K.V
Kirill A. Shutemov kir...@shutemov.name writes: On Sun, May 18, 2014 at 07:45:59PM -0400, Matthew Wilcox wrote: On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: Below is my attempt to play with the problem. I've took one function -- page_referenced_one() -- which looks

Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-18 Thread Kirill A. Shutemov
On Sun, May 18, 2014 at 07:45:59PM -0400, Matthew Wilcox wrote: > On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: > > Below is my attempt to play with the problem. I've took one function -- > > page_referenced_one() -- which looks ugly because of different APIs for > > PTE/PMD

Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-18 Thread Matthew Wilcox
On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: > Below is my attempt to play with the problem. I've took one function -- > page_referenced_one() -- which looks ugly because of different APIs for > PTE/PMD and convert it to use vpte_t. vpte_t is union for pte_t, pmd_t > and

Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-18 Thread Matthew Wilcox
On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: Below is my attempt to play with the problem. I've took one function -- page_referenced_one() -- which looks ugly because of different APIs for PTE/PMD and convert it to use vpte_t. vpte_t is union for pte_t, pmd_t and pud_t.

Re: [RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-18 Thread Kirill A. Shutemov
On Sun, May 18, 2014 at 07:45:59PM -0400, Matthew Wilcox wrote: On Sat, May 17, 2014 at 03:33:05AM +0300, Kirill A. Shutemov wrote: Below is my attempt to play with the problem. I've took one function -- page_referenced_one() -- which looks ugly because of different APIs for PTE/PMD and

[RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-16 Thread Kirill A. Shutemov
Linux VM was built with fixed page size in mind. We have rich API to deal with page table entries, but it focused mostly on one level of page tables -- PTE. As huge pages was added we duplicated routines on demand for other page tables level (PMD, PUD). With separate APIs it's hard to harmonize

[RFC, PATCH] mm: unified interface to handle page table entries on different levels?

2014-05-16 Thread Kirill A. Shutemov
Linux VM was built with fixed page size in mind. We have rich API to deal with page table entries, but it focused mostly on one level of page tables -- PTE. As huge pages was added we duplicated routines on demand for other page tables level (PMD, PUD). With separate APIs it's hard to harmonize