Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3301888ybc; Mon, 18 Nov 2019 12:55:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzmk9vgn4yhhR2/gPNT+BZ4DVUKZTLxeoXGDvK0hdSdFex9ZBQWHIENnuK3rYty4eI7kW58 X-Received: by 2002:a1c:2b82:: with SMTP id r124mr1440056wmr.112.1574110502302; Mon, 18 Nov 2019 12:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574110502; cv=none; d=google.com; s=arc-20160816; b=sAxIMtyUNMUIdSjIuXjdEKzdjZTmcP0PjDKEmMrGIlPUklOwVjTCSg0DCiYWQIYMU1 NW2Qe3U78DQrMyfsbkbNlRXYOIVDJYzNd4Vx/ppwTK6JX2hCSHA4fUTIQrAIEXoO1tNk Pg2IE0upzMAiXN4QLRYiG8sJUXZ5G/ExDoROmZS0XgxgcDb4FrBOur03kfH2estEW3SI KN3r2tyQLZaZKllHpSy0SI1QBGK+BU1g45AEd8GbsMYsmXZQqVCvm8RBLHSofmLVetOP 5Pdk91P/35ohOwEsrOQLbU4VCvuvLbllRPZ2TtaRdt8oVTrcR5Rg5lGjKhYP69MCUHzM sLgg== 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=wF8dAQ1iBmtjAKVyWqtOo18AFkp8cJSHW5qL0Tql1gA=; b=TXq8xXWOrjYNZ5CXnYvnpSWAXAAU1Gpjp+kfHO/iAIxmJ89tSAO7FOGjqJO5J403Il omClN4+XAd7kWUztd879186LSkHegzoec+UKxjAe8tY7rZuRNqhj+QN8oTxGJoSBdZ3r 5fuJGbsVpRDA+1J4c9bcPcfeAahTEm9C1tVKsD5RiHB99BSRoowvq22JVb9/mH+w5sZa nt0orVLx/pzpFddzNCEl5pFe5m/O9oVqlBp8WsxjN3GSmH5awka+OaURfwuy3tQthGJe oza+P1KC0GInB37YPFgm/w24dUuiWvr6YI+5/ND23tbG+iQ4HelEWaT9HfGqhxwOij/d 3wSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=cFizdKjN; 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 o28si14198806edc.353.2019.11.18.12.54.37; Mon, 18 Nov 2019 12:55:02 -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=cFizdKjN; 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 S1726990AbfKRUwT (ORCPT + 99 others); Mon, 18 Nov 2019 15:52:19 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33351 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbfKRUwS (ORCPT ); Mon, 18 Nov 2019 15:52:18 -0500 Received: by mail-qt1-f193.google.com with SMTP id y39so21919891qty.0 for ; Mon, 18 Nov 2019 12:52:18 -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=wF8dAQ1iBmtjAKVyWqtOo18AFkp8cJSHW5qL0Tql1gA=; b=cFizdKjNblrM9pzSQ/2fHMOquDVEhNIGZlQjpXW1fPigQ1iAqdBbfn0uBwZII7Egjh Y3N3A9TxlqPZnvzq/oSRwHEyqUyAym3zxJFA5/2Qx0HyQ10Kj+L8/HnbPqFlC/PLpxzI KErp8Ulh04eV047AZRTA2HzUlLSHoWEmPPh0H9ERRlXiXXpPshFjmaArAXuoBlVvjCOj k5mWzCyRRC6SAJeScUI/ml3LScttWyjRYcaashMysWMrcJLuVdtb99wy+/N0B0+5qXAc s6uoecRtKGJiLL0jaF/2MrutzFaWSU5wg3LS2tLBzDcK2QvQL3c5JlYgFs42W12FyAu+ ERyQ== 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=wF8dAQ1iBmtjAKVyWqtOo18AFkp8cJSHW5qL0Tql1gA=; b=E8NKJvyI1yy6FqZ6jAjh8tXEz7Ea0tuZLujdpxPLbhpJVyqPQCZ7SzpWYe2cQa7A5l kGstBvcU1Ey2nhIMkwnfbixBAPPJrC9EEo+jL6kIgTeh4dRCcEI/SDP+6Bw3mCAAHK+5 bgF55l0g0kmSQHk2VPEvL8N66LkLDAdIJ0KsejEjGUwKBi/1czoPoVQQFiQ4HB6nMMMg PrRQm0fjJkZP3Qf6c267AL9UQlgswqr7diKQoV/MUHMm/i2zyGpZAf9SUVh2BDvaSY6N iQBUoDwG16yA9cJz8yRObk8EctqSsTZQDO6W+QR6QOucvMxjp9Hp+3aJyx7GwgY3bvB5 3axg== X-Gm-Message-State: APjAAAXhZVCE/Q2IuveA5YvzTTDkwjE4LiZdmslrftX8KZCzcNqDZrYW C7dIEOYGrK2F9IB9cfpbMRK8Oc3E2oU= X-Received: by 2002:ac8:4816:: with SMTP id g22mr29724969qtq.112.1574110337500; Mon, 18 Nov 2019 12:52:17 -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 p59sm11014913qtd.2.2019.11.18.12.52.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2019 12:52:16 -0800 (PST) Message-ID: <1574110334.5937.142.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:52:14 -0500 In-Reply-To: <20191118182853.GC372119@cmpxchg.org> References: <1573848697-29262-1-git-send-email-cai@lca.pw> <20191118182547.GA372119@cmpxchg.org> <20191118182853.GC372119@cmpxchg.org> 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 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.