Re: [-mm][PATCH 2/4] Setup the memrlimit controller (v5)

Andrea Righi
2008-06-12T09:12:29Z

Andrew Morton wrote:
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -9,6 +9,7 @@
>> #include <linux/list.h>
>> #include <linux/mmzone.h>
>> #include <linux/rbtree.h>
>> +#include <linux/kernel.h>
>> #include <linux/prio_tree.h>
>> #include <linux/debug_locks.h>
>> #include <linux/mm_types.h>
>> @@ -41,6 +42,9 @@ extern unsigned long mmap_min_addr;
>>
>> #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>>
>> +/* to align the pointer to the (next) page boundary */
>> +#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
>> +
>> /*
>> * Linux kernel virtual memory manager primitives.
>> * The idea being to have a "virtual" mm in the same way
>
> You don't really need the #include <linux/kernel.h> there. As long as
> all callsites which _use_ PAGE_ALIGN are including kernel.h via some
> means (and they surely will be) then things will work OK.

OK, testing without linux/kernel.h inclusion.

-Andrea

>
> But it won't hurt. We're already picking up kernel.h there via
> mmzone.h->spinlock.h and probably 100 other routes. One more won't
> make a lot of difference ;)