From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 721BCC4CEC9 for ; Tue, 17 Sep 2019 10:15:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E6AE21852 for ; Tue, 17 Sep 2019 10:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568715323; bh=VCkFv5d1sz5QGJKM9JYRikRxAKBarLOCemQVcrE6fQY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=mOEr3cd2ckUjk9oJdMuvpgMPWmXYczaNVyEntO5YoVMj3BWsUURaq4ch7tSuu9ui+ OV+phPjrdKLDh0OlXBBwPapjLCvwq/toOufYh7QMPUr1Tw1IVOpUgVZDHSNsmL7meX XbxuDZtNpMu3oLZnGOlRmxBaCbxOwKxxDIXqKRBo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727669AbfIQKPW (ORCPT ); Tue, 17 Sep 2019 06:15:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:36386 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727636AbfIQKPW (ORCPT ); Tue, 17 Sep 2019 06:15:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8A029AE7F; Tue, 17 Sep 2019 10:15:20 +0000 (UTC) Date: Tue, 17 Sep 2019 12:15:19 +0200 From: Michal Hocko To: "Kirill A. Shutemov" Cc: Lucian Adrian Grijincu , linux-mm@kvack.org, Souptick Joarder , linux-kernel@vger.kernel.org, Andrew Morton , Rik van Riel , Roman Gushchin Subject: Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT Message-ID: <20190917101519.GD1872@dhcp22.suse.cz> References: <20190913211119.416168-1-lucian@fb.com> <20190916152619.vbi3chozlrzdiuqy@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190916152619.vbi3chozlrzdiuqy@box> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 16-09-19 18:26:19, Kirill A. Shutemov wrote: > On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > > As pages are faulted in MLOCK_ONFAULT correctly updates > > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. > > I don't think there's something wrong with this behaviour. It is okay to > keep the page an evictable LRU list (and not account it to NR_MLOCKED). evictable list is an implementation detail. Having an overview about an amount of mlocked pages can be important. Lazy accounting makes this more fuzzy and harder for admins to monitor. Sure it is not a bug to panic about but it certainly makes life of poor admins harder. If there is a pathological THP behavior possible then we should look into that as well. -- Michal Hocko SUSE Labs