Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5736383imm; Tue, 16 Oct 2018 15:28:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV63DXx5Tt6OctXFAS9T4T97s6eC9JPSY5vaLkn/t57yqFAKE54RmNq82fTM8fFVyoN37FK8W X-Received: by 2002:a62:3047:: with SMTP id w68-v6mr23894739pfw.19.1539728910070; Tue, 16 Oct 2018 15:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539728910; cv=none; d=google.com; s=arc-20160816; b=Tj5iBPm4/V6Q51jDrelKDWVPmZr+x/9Rvq7JKXcxTkT7CCatjLpJuxYbKTWOgogN6p TOD0pMM7ED64pDCOKXGsGkpvv49uGat1OEl5nEDkYep6EjesCLA+1NkINk1J6vJDtvkh +ebg+U+cC4CW9D+9NgUfhx5RfTOalNxEJMCcm323zWZnEss1uPjr6v22uLczbST/h2nZ 8wO7CDZsDdUh0irWtm1Y5oDWYGyM1CkDcWgFAd0UNM8U5A0QvxRqWZ6qqCiMaDyWJ9eU 7RIvgmj5QRv/CgkO24jg45FcyisrUHgXlLICKRPxDwhE4miSwiQqXQOInJy02fZqlz2+ Wa7Q== 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:message-id:subject:cc:to:from:date; bh=HSbqfIFs7VUQt6wzxDbexPIK7dhN4pAgk/nT7Jos3Sc=; b=0GD9kPG6vb8QM8LxkhhSs07dltbP/wLtnPEIDvmjWh69BWK6x+NaL5/pgOVPMyGIFF vEhDid6NlOOWrh1Z8biAaRatXUb8NfGFHT2ML3c029a0UA62qzsKOc6qtcL7ar+/orvU MHKP/rEqDVGtmyh+NTH2SH7w3uGZm5/deKzu/Gi0WRLRQZ6yqZAdQB2tSv4uYU6eBEo4 6xYhv79G4CXeVlgo38KEFdKkl9E/jt0P9SiI32fDCWJXO4jsp6hQb5aVEBUJDWVGDHq8 9dI8v2L7QIzHJ6NmFJ26XRADsBsdsXL7jlqOL7OAmQIvMy5lWZ93n+8LuVhJbYr5Reko UeaA== ARC-Authentication-Results: i=1; mx.google.com; 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 6-v6si14979937plb.230.2018.10.16.15.28.14; Tue, 16 Oct 2018 15:28:30 -0700 (PDT) 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; 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 S1727233AbeJQGUU (ORCPT + 99 others); Wed, 17 Oct 2018 02:20:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44078 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbeJQGUU (ORCPT ); Wed, 17 Oct 2018 02:20:20 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7A8172936; Tue, 16 Oct 2018 22:27:49 +0000 (UTC) Date: Tue, 16 Oct 2018 15:27:48 -0700 From: Andrew Morton To: Mel Gorman Cc: Johannes Weiner , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 3/4] mm: workingset: add vmstat counter for shadow nodes Message-Id: <20181016152748.28b6df15a0410447c3abdc2a@linux-foundation.org> In-Reply-To: <20181016084923.GH5819@techsingularity.net> References: <20181009184732.762-1-hannes@cmpxchg.org> <20181009184732.762-4-hannes@cmpxchg.org> <20181009150845.8656eb8ede045ca5f4cc4b21@linux-foundation.org> <20181016084923.GH5819@techsingularity.net> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018 09:49:23 +0100 Mel Gorman wrote: > > Can we do this? > > > > --- a/mm/workingset.c~mm-workingset-add-vmstat-counter-for-shadow-nodes-fix > > +++ a/mm/workingset.c > > @@ -377,6 +377,8 @@ void workingset_update_node(struct radix > > * already where they should be. The list_empty() test is safe > > * as node->private_list is protected by the i_pages lock. > > */ > > + WARN_ON_ONCE(!irqs_disabled()); /* For __inc_lruvec_page_state */ > > + > > if (node->count && node->count == node->exceptional) { > > if (list_empty(&node->private_list)) { > > list_lru_add(&shadow_nodes, &node->private_list); > > Note that for whatever reason, I've observed that irqs_disabled() is > actually quite an expensive call. I'm not saying the warning is a bad > idea but it should not be sprinkled around unnecessary and may be more > suitable as a debug option. Yup, it is now VM_WARN_ON_ONCE().