[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140501151116.GM23991@suse.de>
Date: Thu, 1 May 2014 16:11:16 +0100
From: Mel Gorman <mgorman@...e.de>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Linux-MM <linux-mm@...ck.org>,
Linux-FSDevel <linux-fsdevel@...r.kernel.org>,
Johannes Weiner <hannes@...xchg.org>,
Vlastimil Babka <vbabka@...e.cz>, Jan Kara <jack@...e.cz>,
Michal Hocko <mhocko@...e.cz>, Hugh Dickins <hughd@...gle.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 11/17] mm: page_alloc: Use unsigned int for order in more
places
On Thu, May 01, 2014 at 07:35:47AM -0700, Dave Hansen wrote:
> On 05/01/2014 01:44 AM, Mel Gorman wrote:
> > X86 prefers the use of unsigned types for iterators and there is a
> > tendency to mix whether a signed or unsigned type if used for page
> > order. This converts a number of sites in mm/page_alloc.c to use
> > unsigned int for order where possible.
>
> Does this actually generate any different code? I'd actually expect
> something like 'order' to be one of the easiest things for the compiler
> to figure out an absolute range on.
>
Yeah, it generates different code. Considering that this patch affects an
API that can be called external to the code block how would the compiler
know what the range of order would be in all cases?
--
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists