Message ID | 3011bee7-182-97a2-1083-d5f5b688e54b@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp107605wrs; Tue, 18 Oct 2022 20:31:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/UKhvQ5QNHmM2T/kKCVVjdBhn2pvXEqWhEWy9Xb0u76kl8UUj3TfEhVqDkf2wbb9+iXza X-Received: by 2002:aa7:cd92:0:b0:456:cbb5:2027 with SMTP id x18-20020aa7cd92000000b00456cbb52027mr5397002edv.384.1666150302230; Tue, 18 Oct 2022 20:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666150302; cv=none; d=google.com; s=arc-20160816; b=wBR++S35QZZ6T7wfQKbGh2oh29Ko9+EtXDJulZw8eiifBTobkRxqbr8zlX6BRnMgPl 2a7QpUyNL3Xd+YgvrJB+JQGoOK/0K1AzwvuU7luyEvuWUFE+oryE9/H8XCVSbVscWGag DP49fsIfoqkpEjDhB7X7VazS75zYC7y8Qh2UdsF4wM+tS0zs42Mv/pdeuFv6nohTeBzN fsMm0lu25D20wLcfgNjYQUd/NiN9U4VrU2OmSIz7z1Cng1NvlXkHjrqoJDTjTE6iQArB Ltcd1ieU+sawlYCEGpPlvtOq3TOlqDwGF/qY2WldDExjzAz9qyHUUsfOxossx90To9x0 AwyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=YFRpkYlMkHUeJArQhTXYLLn44EzxjIHV71PVaWlrs9A9XLl0+AVzH48F+2wSDcY68k OB3LwWm2qRrG/UtbL5hhLAqUanNGyxQHMCiPZDG+mvIhKSx9QnszeUV8vr9RTpcBD92Z QqnqYAsmOHUXI+OI2g6phCr7JAEb+INLCcWQ4k2G11wDH92Xh43mlxJphA3JnfExyrqG qZ3eamu/Ri/ryIg7iQfcrayVm/ng/F5Iza5ziloFWIkAykNyVSmlFnK3MzcuHMu2k5zY 4D7pzQNqSlGsCLR6v+f7Udj6GrMzAJdvDj+O47ME6AP84NkeNMpcP+kKGb6CssioTRsj VRyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=K33RaYRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cn4-20020a0564020ca400b0045c4b1f4315si11932479edb.485.2022.10.18.20.31.17; Tue, 18 Oct 2022 20:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=K33RaYRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229584AbiJSDSz (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Tue, 18 Oct 2022 23:18:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJSDSw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 23:18:52 -0400 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 101C3E8AB5 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 20:18:52 -0700 (PDT) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-12c8312131fso19183658fac.4 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 20:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=K33RaYRgNppDWt/10xzhwd1v4B26clXQn+9iNAMke6fpUUlY+ZvG3M7UC9+DN5ZlMN zBoltdhn9vtmhEj1dWpB6mpxm2ExFrfqcH/0BHF4Yr/69k/Pp11/7iJmvbbwHvAId5cC RZ8PAN4fWaorWkQHvNJFZi5E8lr1HVCpFyp2yPiF4ZY1RsDGlBhpu38Foor+F+GaOpii izUeSQbPHKsKUW6zAQbAm06q2ZcINLwY+Rqc3EeIlzfdtgTDzhkFNsTt2ML/RWZODdfI +OCDuso4CR3Z2o1VoOOzQnHO3pyrfXz1+XQ75mTALt2W+1tA5NFpA8fih1YTfXXdxO3M okyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=VhCEu4YAxoYdsqEa5aB1PzjmGeHypEF938Rf403HrrkJ+FkYOH601G0eXLLE46skXx nRUDvhh2idRPHmcUmVcdUbk9qDuRIhJdiLI9rTMRPrgkwQallqgJ1QCSxRW1SYvguks2 pWKztVCO67piuiXWrsTj25gARbrK/erh9XWjIfKjBbQxBLqJuioft8kyfa2VYotNRXrV hee5t2k5+45ebpjXyqFTINIjfeKPbsYzK7HZE8EyLSxPOR5EL/nTf3oGkfxBLmKQRwHZ R5hT1iIbZsL162aWD7Vn8w2yirzvsqFpKCR1dIjDcD3CExPyhrdm/ugj10rwue3HK+xK Nf6g== X-Gm-Message-State: ACrzQf1plpMg4N/ru5swUb42sUr2toHP4k/1JS4Ov1vY6meMiJvIoz4R 4NtsW4l92+e/mElyzt5dOkgyCQ== X-Received: by 2002:a05:6870:a553:b0:11e:5231:4eec with SMTP id p19-20020a056870a55300b0011e52314eecmr3613843oal.143.1666149529319; Tue, 18 Oct 2022 20:18:49 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id w192-20020acaadc9000000b00353f41440dasm6184323oie.56.2022.10.18.20.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 20:18:49 -0700 (PDT) Date: Tue, 18 Oct 2022 20:18:38 -0700 (PDT) From: Hugh Dickins <hughd@google.com> X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton <akpm@linux-foundation.org> cc: Matthew Wilcox <willy@infradead.org>, "Liam R. Howlett" <Liam.Howlett@Oracle.com>, Alexey Dobriyan <adobriyan@gmail.com>, Seth Jenkins <sethjenkins@google.com>, Vlastimil Babka <vbabka@suse.cz>, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search Message-ID: <3011bee7-182-97a2-1083-d5f5b688e54b@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747085219399248368?= X-GMAIL-MSGID: =?utf-8?q?1747085219399248368?= |
Series |
mm: /proc/pid/smaps_rollup: fix maple tree search
|
|
Commit Message
Hugh Dickins
Oct. 19, 2022, 3:18 a.m. UTC
/proc/pid/smaps_rollup showed 0 kB for everything: now find first vma.
Fixes: c4c84f06285e ("fs/proc/task_mmu: stop using linked list and highest_vm_end")
Signed-off-by: Hugh Dickins <hughd@google.com>
---
fs/proc/task_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Thanks Hugh. I guess this 'optimisation' was a little more aggressive and a little more buggy than needed. Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> * Hugh Dickins <hughd@google.com> [221018 23:18]: > /proc/pid/smaps_rollup showed 0 kB for everything: now find first vma. > > Fixes: c4c84f06285e ("fs/proc/task_mmu: stop using linked list and highest_vm_end") > Signed-off-by: Hugh Dickins <hughd@google.com> > --- > > fs/proc/task_mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- 6.1-rc1/fs/proc/task_mmu.c > +++ linux/fs/proc/task_mmu.c > @@ -902,7 +902,7 @@ static int show_smaps_rollup(struct seq_ > goto out_put_mm; > > hold_task_mempolicy(priv); > - vma = mas_find(&mas, 0); > + vma = mas_find(&mas, ULONG_MAX); > > if (unlikely(!vma)) > goto empty_set;
--- 6.1-rc1/fs/proc/task_mmu.c +++ linux/fs/proc/task_mmu.c @@ -902,7 +902,7 @@ static int show_smaps_rollup(struct seq_ goto out_put_mm; hold_task_mempolicy(priv); - vma = mas_find(&mas, 0); + vma = mas_find(&mas, ULONG_MAX); if (unlikely(!vma)) goto empty_set;