Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3160884ybc; Mon, 18 Nov 2019 10:30:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwq0wAPYXDPKYhXN0L1lpYvp+GROjtGS8BPyQbfVMeplHS9H2EGTbd1/tTAlVDR4jIpLm6S X-Received: by 2002:a17:906:6dcf:: with SMTP id j15mr28548939ejt.104.1574101827288; Mon, 18 Nov 2019 10:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574101827; cv=none; d=google.com; s=arc-20160816; b=bdcHnWwiBllwye+ZtXgHocbJq5eAwlD6Dl/21ErTuZILY0z1J6auvL3u6PviIyjuSQ eHB8kICWSS0LT0nibVOIe8LJiD7ZJ6lyr+n2nVRXFlbnrW2rZpU2t72w1E6pJd90Tr6/ LtrWoDDf3D38iU7edH6qvnq7cK3Gm3qC1M9RkkYaLel/9hTZ3gxo8M4fMzSqn0ImCoSO tdglg0+pUYsojCG1VjeeD0M+vrXYaplDxvp0OOcxdvTydhenvgXB9UAckpfWjEsPJ8tT grdySFlOQzA1ZN0gllabCEq91F6Y72M8Ks37mfATKLP3RrqqcQ+GOG8vlsn9G+9p/dIb TK6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rury4ZZBdE8YLeSDPwSjljk3dVtJlEOvKyMr2vi3O/U=; b=Tki2R8a5tDADVPMrB3Qw0oZySD9eYTY34sfo+gR/NM/uJwR5LVspTWafRzbw/75H30 SZFixC9+cqh1c/l5XoGbcu3nQ0+NC8S+Xk7THsat06wyAx8+loJyjV74Gdov1kKV/zyg ulY/rVPJy2iZYjW87d6ZGAjwPtO1FOYRcfXaC/KYbSTcJ/bc4IzRmxYw0+GynGdhOm4G 6iboC/umYUEwG4tn3nEIUMtsePtIAZbHr8ORsSSae54En8lqbQXLfsoAzmeJ4eayzJ8b 9+1F5Jy17TjzBwfpjRLK/yK68/EUoXFEDFoNkXYqPIsoTp2j/mBzBp6K9HrwSUyjMCFB 61tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=t5weXUGA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20si12004481ejq.189.2019.11.18.10.30.02; Mon, 18 Nov 2019 10:30:27 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=t5weXUGA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbfKRS24 (ORCPT + 99 others); Mon, 18 Nov 2019 13:28:56 -0500 Received: from mail-qv1-f66.google.com ([209.85.219.66]:46090 "EHLO mail-qv1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbfKRS24 (ORCPT ); Mon, 18 Nov 2019 13:28:56 -0500 Received: by mail-qv1-f66.google.com with SMTP id w11so6955438qvu.13 for ; Mon, 18 Nov 2019 10:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rury4ZZBdE8YLeSDPwSjljk3dVtJlEOvKyMr2vi3O/U=; b=t5weXUGAVmsQStwPj4v4X/U1MmOY95N/K56kPstKmQF4arNhyRORYSXsWauzEacMXb JqhTYeEb1S364qsmlrmH2Ac0I49RfS5VfaipBlRA4LTAeyLOUWPW1paOU7a4oRkJOiV7 k/YI7dV2R8eGFp9rKo+JiT+PlhARfTYuaQ2jSeqOp2uA0ik41qAUY+VIDzaRviKLjbWU WyiILBRcfAyWWgqTWScDeJu4fRb6NUGl2+uAnpWSMR7MIeAn5zq5kuCSVzknRMJw/kNy aPu4XUNv+4/FST7Sq5GX73fckuKvxVYDE9W+iMHnunV3Wc6J+OcNU7Hmppo4Ur3H2Qcl HvRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rury4ZZBdE8YLeSDPwSjljk3dVtJlEOvKyMr2vi3O/U=; b=VokybTsLz27+zLGxVaQhtptkCg4cYhYVVLllZoATbtFfD2Ai3ca5/o6oSK5a+B7HWf H2AHEhO84ot9uZE/xv5fUmHY1wlHhiorJpq3DDAT1dZZpUK3JC60LwgypJ/FtfBCP80J ZqpyfeulNLAZ/gU9KLlx8djUq9Du5T5icB+hIT5TJOYgciIpFgRt+TjMUf88ucd9viHs zqsnSJv7VcVFi5JeEIGGwx39xQdiu48uW9FzA48fFHpq4O6/4cT4XQYsL7M1aHjtaJ4y r+fM7lAwzliGO12U6JgW/1OIS8mywncMjSxHK32feJMvZUfcumM35EmW8QR9+yHFSHpx jURg== X-Gm-Message-State: APjAAAXioz2WdTLgxxuYDnfBlwQqYhTlC1urs/1mfsq67OE3NyAh0x2U SZ+iPkEkEIXtIIFlubITK5BWpw== X-Received: by 2002:a0c:df89:: with SMTP id w9mr16219834qvl.158.1574101735081; Mon, 18 Nov 2019 10:28:55 -0800 (PST) Received: from localhost ([2620:10d:c091:500::1:1113]) by smtp.gmail.com with ESMTPSA id d126sm8997866qkc.93.2019.11.18.10.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 10:28:54 -0800 (PST) Date: Mon, 18 Nov 2019 13:28:53 -0500 From: Johannes Weiner To: Qian Cai Cc: akpm@linux-foundation.org, surenb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v2] mm/vmscan: fix some -Wenum-conversion warnings Message-ID: <20191118182853.GC372119@cmpxchg.org> References: <1573848697-29262-1-git-send-email-cai@lca.pw> <20191118182547.GA372119@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191118182547.GA372119@cmpxchg.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!