From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbbAPHIJ (ORCPT ); Fri, 16 Jan 2015 02:08:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42609 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbbAPHIH (ORCPT ); Fri, 16 Jan 2015 02:08:07 -0500 Date: Fri, 16 Jan 2015 09:07:44 +0200 From: "Michael S. Tsirkin" To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Johannes Weiner , Vladimir Davydov , Rik van Riel , Michal Hocko , Mel Gorman , Vlastimil Babka , Suleiman Souhlal , linux-mm@kvack.org Subject: Re: [PATCH] mm/vmscan: fix highidx argument type Message-ID: <20150116070744.GA12190@redhat.com> References: <1421360175-18899-1-git-send-email-mst@redhat.com> <20150115144920.33c446af388ed74c11dc573e@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115144920.33c446af388ed74c11dc573e@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 15, 2015 at 02:49:20PM -0800, Andrew Morton wrote: > On Fri, 16 Jan 2015 00:18:12 +0200 "Michael S. Tsirkin" wrote: > > > for_each_zone_zonelist_nodemask wants an enum zone_type > > argument, but is passed gfp_t: > > > > mm/vmscan.c:2658:9: expected int enum zone_type [signed] highest_zoneidx > > mm/vmscan.c:2658:9: got restricted gfp_t [usertype] gfp_mask > > mm/vmscan.c:2658:9: warning: incorrect type in argument 2 (different base types) > > mm/vmscan.c:2658:9: expected int enum zone_type [signed] highest_zoneidx > > mm/vmscan.c:2658:9: got restricted gfp_t [usertype] gfp_mask > > Which tool emitted these warnings? Oh, sorry. It's sparce. > > convert argument to the correct type. > > > > ... > > > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -2656,7 +2656,7 @@ static bool throttle_direct_reclaim(gfp_t gfp_mask, struct zonelist *zonelist, > > * should make reasonable progress. > > */ > > for_each_zone_zonelist_nodemask(zone, z, zonelist, > > - gfp_mask, nodemask) { > > + gfp_zone(gfp_mask), nodemask) { > > if (zone_idx(zone) > ZONE_NORMAL) > > continue; > > hm, I wonder what the runtime effects are. > > The throttle_direct_reclaim() comment isn't really accurate, is it? > "Throttle direct reclaimers if backing storage is backed by the > network". The code is applicable to all types of backing, but was > added to address problems which are mainly observed with network > backing? As far as I can tell, yes. It would seem that it can cause deadlocks in theory. Cc stable on the grounds that it's obvious? -- MST