Thread (31 messages) 31 messages, 7 authors, 2013-02-20

Re: [PATCH 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable()

From: Michel Lespinasse <hidden>
Date: 2013-02-06 02:26:51
Also in: linux-fsdevel, lkml

Just nitpicking, but:

On Tue, Feb 5, 2013 at 3:57 AM, Mel Gorman [off-list ref] wrote:
+static inline bool zone_is_idx(struct zone *zone, enum zone_type idx)
+{
+       /* This mess avoids a potentially expensive pointer subtraction. */
+       int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones;
+       return zone_off == idx * sizeof(*zone);
+}
Maybe:
return zone == zone->zone_pgdat->node_zones + idx;
?

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help