Re: [-mm][PATCH 1/4] Setup the rlimit controller

From: Balbir Singh
Date: Mon May 05 2008 - 23:42:09 EST


Andrew Morton wrote:
> On Sun, 04 May 2008 03:07:36 +0530
> Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
>
>> + *tmp = ((*tmp + PAGE_SIZE) >> PAGE_SHIFT) << PAGE_SHIFT;
>
> Whatever this is doing, it should not be doing it this way ;)
>
> perhaps
>
> *tmp = ALIGN(*tmp, PAGE_SIZE);
>
> or even
>
> *tmp = PAGE_ALIGN(*tmp);
>
> ?
>

Good point, thanks for catching this.

>
> <looks at PAGE_ALIGN>
>
> Each architecture implements its own version and they of course do it
> differently. It's crying out for a consolidated implementation but we have
> no include/linux/page.h into which to consolidate it.

May be we can move this to asm-generic/page.h?


--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/