Re: [-mm][PATCH 2/4] Setup the memrlimit controller (v5)
From: Balbir Singh
Date: Thu Jun 12 2008 - 02:14:25 EST
Andrew Morton wrote:
>
> #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
>
> ?
>
> afaict ALIGN() tries to do the right thing, and if it doesn't, we
> should fix ALIGN().
>
That should do the right thing, provided there are no duplicate ALIGN defintions
elsewhere
kernel.h has
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
Which seems like the correct thing, since we use typeof(x) for (a) - 1.
--
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/