Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5165015ybe; Tue, 17 Sep 2019 03:51:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwC67TssSOZWUhHePKpAptXtNL/jGRlljR75cvt8MCcIRKK1kQq6CJJkRNrDi+YwMA7CVmh X-Received: by 2002:a17:906:409b:: with SMTP id u27mr4069070ejj.295.1568717470428; Tue, 17 Sep 2019 03:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568717470; cv=none; d=google.com; s=arc-20160816; b=hK+cBci8+AXP80VFc/hJRS7ZpGPY8y/l0yeCYBP0guhecYUTSjoD01MWzCLx0Ajn/Y Hhgvxoqe4bmwn6UFLOa5PsSPSglx//LSGaOsScYg2YFIBO9/y22BgdfSllQyDnOtsLFs IhsBYXdPDh42AlSs5+YQLEnjrmSSn7EruxsGtCYXuPnIknlxhTqyr0xUDqi/kZnRlnt0 JGvHn5jWBXvUSvbDKQOPIMcVSLXnSS5OHER6fkWR46ZlpxAsb55r2PGiaLY9hiN7W+iF 80OLCWBWaJLlm78VcbIXsCpkwWGuBtJfZLR0l0lMVsVmC6ePk4NZC2FZ0s/FcMQlMYNJ x9xg== 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; bh=M9BdBluBzqS4yjJfGwl3sdGFRNZeYeCCGKBD/l5PPNs=; b=zgXGReF/SPwMLAh3YjXInFRgMhpML0nh5v/+SzPYFLhqJaP4LPB0u96W8zkiQeU6rr Jclsk+iMb+33l0+/VVR6zzLqVmWKBHdUUBYbrl1xQWq2fvvr7bk/IP6BTM2lBuIVA8eq 1VM4hOEa5STIzc+K9M4Nkr9inhjGvURN75Fgt9wj6uRzGYb4FyL0iVRSt0hwJugZNdNg CzHWSZ2tu7CkwqEodIr48cUTO2IXXJLH654GHSrTJMli3a6KXrrdw/1eTFs44DumRL0l wUGrsbbFQce6G/cmg5ODneODI1/y6hfPKUUqeA04NZbmMkuKzIxP37JWlFRtOPYJuobu LG/w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si795995ejj.132.2019.09.17.03.50.46; Tue, 17 Sep 2019 03:51:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727653AbfIQKPW (ORCPT + 99 others); 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