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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 32CF9C169C4 for ; Fri, 8 Feb 2019 17:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BE182146E for ; Fri, 8 Feb 2019 17:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727174AbfBHRE0 (ORCPT ); Fri, 8 Feb 2019 12:04:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:49270 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727084AbfBHRE0 (ORCPT ); Fri, 8 Feb 2019 12:04:26 -0500 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 222A1AF1B; Fri, 8 Feb 2019 17:04:25 +0000 (UTC) Subject: Re: [PATCH v2] mm: proc: smaps_rollup: Fix pss_locked calculation To: Sandeep Patil , adobriyan@gmail.com, akpm@linux-foundation.org, avagin@openvz.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@android.com, dancol@google.com References: <20190203065425.14650-1-sspatil@android.com> From: Vlastimil Babka Message-ID: <5b8e236d-7c43-6c2b-cb3f-cbb0b8923fe2@suse.cz> Date: Fri, 8 Feb 2019 18:04:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190203065425.14650-1-sspatil@android.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 2/3/19 7:54 AM, Sandeep Patil wrote: > The 'pss_locked' field of smaps_rollup was being calculated incorrectly. > It accumulated the current pss everytime a locked VMA was found. Fix > that by adding to 'pss_locked' the same time as that of 'pss' if the vma > being walked is locked. > > Fixes: 493b0e9d945f ("mm: add /proc/pid/smaps_rollup") > Cc: stable@vger.kernel.org # 4.14.y 4.19.y > Signed-off-by: Sandeep Patil Acked-by: Vlastimil Babka Thanks. > --- > > v1->v2 > ------ > - Move pss_locked accounting into smaps_account() inline with pss