Re: [PATCH 2/7] Fragmentation Avoidance V16: 002_usemap

Mel Gorman
2005-10-06T15:12:07Z

On Wed, 5 Oct 2005, David S. Miller wrote:

> From: Mel Gorman <mel@csn.ul.ie>
> Date: Wed, 5 Oct 2005 15:45:57 +0100 (IST)
>
> > + unsigned int type = 0;
> ...
> > + bitidx = pfn_to_bitidx(zone, pfn);
> > + usemap = pfn_to_usemap(zone, pfn);
> > +
>
> There seems no strong reason not to use "unsigned long" for "type" and
> besides that will provide the required alignment for the bitops
> interfaces. "unsigned int" is not sufficient.
>

There is no strong reason. I'll convert them to unsigned longs and check
for implicit type conversions.

> Then we also don't need to thing about "does this work on big-endian
> 64-bit" and things of that nature.
>

Always a plus.

> Please audit your other bitops uses for this issue.
>

I will. Thanks

--
Mel Gorman
Part-time Phd Student Java Applications Developer
University of Limerick IBM Dublin Software Lab