On Sun, May 12, 2013 at 9:23 AM, Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote: > From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> > Better if one or two sentences are prepared to show that the following defines are necessary. > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> > --- > include/linux/huge_mm.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > index 528454c..6b4c9b2 100644 > --- a/include/linux/huge_mm.h > +++ b/include/linux/huge_mm.h > @@ -64,6 +64,10 @@ extern pmd_t *page_check_address_pmd(struct page *page, > #define HPAGE_PMD_MASK HPAGE_MASK > #define HPAGE_PMD_SIZE HPAGE_SIZE > > +#define HPAGE_CACHE_ORDER (HPAGE_SHIFT - PAGE_CACHE_SHIFT) > +#define HPAGE_CACHE_NR (1L << HPAGE_CACHE_ORDER) > +#define HPAGE_CACHE_INDEX_MASK (HPAGE_CACHE_NR - 1) > + > extern bool is_vma_temporary_stack(struct vm_area_struct *vma); > > #define transparent_hugepage_enabled(__vma) \ > @@ -185,6 +189,10 @@ extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vm > #define HPAGE_PMD_MASK ({ BUILD_BUG(); 0; }) > #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; }) > > +#define HPAGE_CACHE_ORDER ({ BUILD_BUG(); 0; }) > +#define HPAGE_CACHE_NR ({ BUILD_BUG(); 0; }) > +#define HPAGE_CACHE_INDEX_MASK ({ BUILD_BUG(); 0; }) > + > #define hpage_nr_pages(x) 1 > > #define transparent_hugepage_enabled(__vma) 0 > -- > 1.7.10.4 > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>