Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3306415ybc; Mon, 18 Nov 2019 13:00:47 -0800 (PST) X-Google-Smtp-Source: APXvYqx6NnCCCZj49OHdsYcToqnZ//EDRXh1dmCEzs4Ypxa0Zwcq9yOUIAQpnIFW9TdsobM7mtka X-Received: by 2002:a17:907:4300:: with SMTP id oa24mr28998006ejb.8.1574110847681; Mon, 18 Nov 2019 13:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574110847; cv=none; d=google.com; s=arc-20160816; b=wr51sObfxZHd6DwWT2TZYfq1fBiUPBtmL1ghol+DjnPTIH+c9lSrPSuViW+cJiKdWw bds39HI4xosIaLUb+2RPefCdfkz5Lz7aB2urxlkqm1Y69G3dhlwxEIXEiXlKV9JEXR21 WkBxckh811oeNTDAQZ4TW89C5KluRITnl3BgFjqmzjXqSKo8H49koDUwZ6KJS7ThQUjU c/zWSwIahZdHA3OxBOx/UacbY+93UgsMIFd/sTrfclph2mC7sFVBLvfo2zNgGjgIb6Ej JlG6bZZktUv403yyHgUWqA3GE7/g9lsIbgvirWUWYQqX1SVSq84ARCEAs67VTWI3IPx5 mCVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=LpQIGKOXBuvR+dqKIe6qupfgLD1+kHFwhnlzCAXLMkI=; b=jfe97bxcy9awnXe1EkcwDJVZhlRfoNXWMzQlxp/8zLf5MvG1GPnpeVGuUx1U1V1SGr HndcY52BtWpVAw3WgwFN4/6kwgr/3L2lJBhWBlpOMnoToPF3+nAjh6G3AxbK/XMzl04l GOMhl4piN/ZCrvfMLnAAVyNdFLbmHbkhhhlKSLqj4ZW4d1N6i3YipMeEHR7NXL3G0/wW x+rjl+z/mqVO46l0K3oRWXkDRegV/vN2MOfdC2wZiuYl52nXKF7dEFQxb2o49noMrppi feBoMBKh9H5Zc5/dG4cEtDNEmNsUMQKOIWtnRXfNzKxenHEQceeS+ipaD3AXf01zxcea ssCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="HY/3X4Py"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si12140616ejj.427.2019.11.18.13.00.23; Mon, 18 Nov 2019 13:00:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="HY/3X4Py"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727099AbfKRU4R (ORCPT + 99 others); Mon, 18 Nov 2019 15:56:17 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:34535 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfKRU4Q (ORCPT ); Mon, 18 Nov 2019 15:56:16 -0500 Received: by mail-qt1-f195.google.com with SMTP id i17so21888228qtq.1 for ; Mon, 18 Nov 2019 12:56:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=LpQIGKOXBuvR+dqKIe6qupfgLD1+kHFwhnlzCAXLMkI=; b=HY/3X4PytVjFgVH4p0dhqrSdeoAERiXGrFMIc9EwdUR7raHTE6LMUKlReOJG86ENg9 oPzUflcxzhACB90GxluhmZsgJuDlUpyCn4vSplR5LH7xVzI3LL9WvKHDuDesdW020V5u emwxROuaukkkd6aBerrod58/V5SgtuyM9abw7hf4/fYgknAt7HaoK1KJ9Fwx+21VlIA9 Nof/uztLpqUukz1fOxoYbUUwEjrhYOnas3touHBFEFFGzewi7jhXOFR9hCFm+yBurobA VsWDSRfmLlWpS5/ljZHFZ9YtELyxIeDrur2kRDrkuQ6fgVF0KZqvZZsM5PVJJfXSfQDv Eq8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=LpQIGKOXBuvR+dqKIe6qupfgLD1+kHFwhnlzCAXLMkI=; b=ISknjUgtnTyacGtXj2HKbk12lNpHrJOjBQ4YCm/b9P482R1YyNFCFDxFowIWhZpjsZ dRZ4JETvs5KyLdJLeEzcgY3ba0+Kf3dcccJqN9+pCoBXxx2xn5L7mYjPuyck3r8LMqsA AvbU8TFAZffVg8NiV4io4Tr5hBSuX9TIjyFFxepkTOgzQYgkEz7mE9h3Zm1/svqD7OBn 8219aXeKYZ0dGZwoS+efaNnqFGO0JvcjRSQTnlbDVYZYuM3cprto5i7uwG1Q5JSpPpzc gzcN8k8QVZI3sYntQ5FK0/Z9iNFLfT46dQ7gjC94lCHU5vwBulZQyQOE/XhxvHGoHppH rmaQ== X-Gm-Message-State: APjAAAV8B872D5drW3nSU4fP3I1wy7kyM9EQ+UMO818yE4RHXkmFdiQg 2awga/TRAMZJVOA+7onkBvZiCg== X-Received: by 2002:ac8:608:: with SMTP id d8mr29368011qth.258.1574110575770; Mon, 18 Nov 2019 12:56:15 -0800 (PST) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id w69sm9419221qkb.26.2019.11.18.12.56.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2019 12:56:15 -0800 (PST) Message-ID: <1574110573.5937.144.camel@lca.pw> Subject: Re: [PATCH -next v2] mm/vmscan: fix some -Wenum-conversion warnings From: Qian Cai To: Johannes Weiner Cc: akpm@linux-foundation.org, surenb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Mon, 18 Nov 2019 15:56:13 -0500 In-Reply-To: <1574110334.5937.142.camel@lca.pw> References: <1573848697-29262-1-git-send-email-cai@lca.pw> <20191118182547.GA372119@cmpxchg.org> <20191118182853.GC372119@cmpxchg.org> <1574110334.5937.142.camel@lca.pw> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-11-18 at 15:52 -0500, Qian Cai wrote: > On Mon, 2019-11-18 at 13:28 -0500, Johannes Weiner wrote: > > On Mon, Nov 18, 2019 at 01:25:49PM -0500, Johannes Weiner wrote: > > > On Fri, Nov 15, 2019 at 03:11:37PM -0500, Qian Cai wrote: > > > > The -next commit "mm: vmscan: enforce inactive:active ratio at the > > > > reclaim root" [1] introduced some Clang -Wenum-conversion warnings, > > > > > > > > mm/vmscan.c:2216:39: warning: implicit conversion from enumeration type > > > > 'enum lru_list' to different enumeration type 'enum node_stat_item' > > > > [-Wenum-conversion] > > > > inactive = lruvec_page_state(lruvec, inactive_lru); > > > > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~ > > > > mm/vmscan.c:2217:37: warning: implicit conversion from enumeration type > > > > 'enum lru_list' to different enumeration type 'enum node_stat_item' > > > > [-Wenum-conversion] > > > > active = lruvec_page_state(lruvec, active_lru); > > > > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ > > > > mm/vmscan.c:2746:42: warning: implicit conversion from enumeration type > > > > 'enum lru_list' to different enumeration type 'enum node_stat_item' > > > > [-Wenum-conversion] > > > > file = lruvec_page_state(target_lruvec, LRU_INACTIVE_FILE); > > > > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > > > > > > > > Since it guarantees the relative order between the LRU items, fix it by > > > > using NR_LRU_BASE for the translation. > > > > > > > > [1] http://lkml.kernel.org/r/20191107205334.158354-4-hannes@cmpxchg.org > > > > > > > > Signed-off-by: Qian Cai > > > > > > Acked-by: Johannes Weiner > > > > > > Thanks Qian! > > > > > > Andrew, this is a fix for "mm: vmscan: enforce inactive:active ratio > > > at the reclaim root". Could you please fold this into that? > > > > nvm, I see you already picked it up. Thank you! > > Hmm, I don't see Andrew picked it yet. Ah, I saw it now. Too many emails, so I'll setup a filter.