From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michel Lespinasse Subject: Re: [PATCH 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable() Date: Tue, 5 Feb 2013 18:26:51 -0800 Message-ID: References: <1359972248-8722-1-git-send-email-linfeng@cn.fujitsu.com> <1359972248-8722-2-git-send-email-linfeng@cn.fujitsu.com> <20130204160624.5c20a8a0.akpm@linux-foundation.org> <20130205115722.GF21389@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Andrew Morton , Lin Feng , bcrl@kvack.org, viro@zeniv.linux.org.uk, khlebnikov@openvz.org, kamezawa.hiroyu@jp.fujitsu.com, minchan@kernel.org, riel@redhat.com, rientjes@google.com, isimatu.yasuaki@jp.fujitsu.com, wency@cn.fujitsu.com, laijs@cn.fujitsu.com, jiang.liu@huawei.com, linux-mm@kvack.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Mel Gorman Return-path: In-Reply-To: <20130205115722.GF21389@suse.de> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org Just nitpicking, but: On Tue, Feb 5, 2013 at 3:57 AM, Mel Gorman 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-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org