Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3366617pxp; Tue, 22 Mar 2022 18:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0ChVMEgPsKK6LhOZ1FtWhbX0ssW5tTStYQrhGNUhZhdNqIGyKF+uZ7dChNVUPmCih+KDZ X-Received: by 2002:a17:906:181a:b0:6d0:ebf5:c064 with SMTP id v26-20020a170906181a00b006d0ebf5c064mr28149076eje.82.1647999626978; Tue, 22 Mar 2022 18:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647999626; cv=none; d=google.com; s=arc-20160816; b=S1TTOUPHmZZ9xX0UIzdv0EEu+PpkiiaULBW4iCxkQetcnhF1JV0H5IDHvl+PkzD+wU rUPaadsvf2CgdtHY7plHSWV9ACkP2/iPYDcCjNouXfCKIeOka2GLgQtjjYYGRYEjL1jo Z0k+EXwkIubhVDv/6w27aa1UReXdkGbfk/npuTYy5Oz01ALat7LTUqhV6KPG5p8pdkcG 2J7p1ub7W7SQoKtcuJCE9GIRwLov3Nl5mDikooGeLFnPniyUlQ9Oi9jO72M7y5cExG/R pcIzQVXhSHpxWV+xfUhrLA8ol2Sq9RJxmDw99yIjvTgSWdkkj4UFJuD/W4nhX5gv7+hn +cdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=JrK610/hsvwwJB9dGPvgOWZ0Ncfc9HGrOcQXY/62VNE=; b=T2693x/4SdgrmVCaqU3CRsgrRWIGz3r3KfdlL4SJvDRumcdyerR4hFx7e9JLjW4yeR Ztos5Qu1DPtGJlx/qb2QKRTBk6GLHGGc1kaaUg/qmngGU/+oP5a6FzqLWgSpeVWN9Skt UFS8hS0v/o0FHcbaSn+a0kx5OoGzsEc0BLdgeODLCrca+M3B4ebfw1Kz24T8OfCYOcFG rhW9MTjo8zuTOcPjrfanVhZbB7ncnZglrsQQE47WQP+7ewAh6L3fp5Ot1tqsHns3sE9M T+YUtf0nY+wGIm5aI2j7FuoLShxtKeuLf87OlMaFoz/jrJ620OMF5lLu3pue0v/ykHQC xbbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FoeJffCY; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a170906150800b006df76385e0csi10607149ejd.684.2022.03.22.18.40.01; Tue, 22 Mar 2022 18:40:26 -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=@suse.cz header.s=susede2_rsa header.b=FoeJffCY; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238331AbiCVPMT (ORCPT + 99 others); Tue, 22 Mar 2022 11:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234842AbiCVPMR (ORCPT ); Tue, 22 Mar 2022 11:12:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498A5245BD for ; Tue, 22 Mar 2022 08:10:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E8CEB1F387; Tue, 22 Mar 2022 15:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1647961846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JrK610/hsvwwJB9dGPvgOWZ0Ncfc9HGrOcQXY/62VNE=; b=FoeJffCYkfOs9GZORCCTR9/VbjoFH/MNUWVN25oRg60P0I1m5GQtIAgE0NDUE9iIzdt3wa uoDCeXQADznpo97tUssC2CChCfEsVjMhkboVzCqHZQUYUDX98OlKAjNzlW27aJEFXl12FZ Rs1jhE6IwsWMWgLVkv0yJi2MPKJNZSg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1647961846; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JrK610/hsvwwJB9dGPvgOWZ0Ncfc9HGrOcQXY/62VNE=; b=pRUTZLwzDQYqzBfbzU86ul0y/0k7SUypabmg/leJVPr+Ewu8r95b4+BE4UTvoNxwfgGPr0 ZYiYoOIZVZp+OQAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C3982133B6; Tue, 22 Mar 2022 15:10:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yPonL/bmOWIwQwAAMHmgww (envelope-from ); Tue, 22 Mar 2022 15:10:46 +0000 Message-ID: <11814119-0e5c-3e4f-29c4-d2e9b8dfb622@suse.cz> Date: Tue, 22 Mar 2022 16:10:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 1/2] mm/page_owner.c: introduce vmalloc allocator for page_owner Content-Language: en-US To: Yinan Zhang , Matthew Wilcox Cc: akpm@linux-foundation.org, william.kucharski@oracle.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, yejiajian2018@email.szu.edu.cn, hanshenghong2019@email.szu.edu.cn, caoyixuan2019@email.szu.edu.cn, zhaochongxi2019@email.szu.edu.cn, yuhongf@szu.edu.cn References: <20220322032225.1402992-1-zhangyinan2019@email.szu.edu.cn> <299aef9a-dd57-2197-f3cf-6b08c441f755@email.szu.edu.cn> From: Vlastimil Babka In-Reply-To: <299aef9a-dd57-2197-f3cf-6b08c441f755@email.szu.edu.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On 3/22/22 15:48, Yinan Zhang wrote: > on 2022/3/22 11:28, Matthew Wilcox wrote: > >> On Tue, Mar 22, 2022 at 11:22:24AM +0800, Yinan Zhang wrote: >>> An application's memory consumption is high and keeps increasing, >>> then it is suspected of having memory leak. There are several >>> commonly used memory allocators: slab, cma, vmalloc, etc. The memory >>> leak identification can be speed up if page information allocated >>> by an individual allocator are analyzed individually. This patch >>> introduce vmalloc allocator for page_owner. >> Why is /proc/vmallocinfo not enough? > > There is only one owner information in /proc/vmallocinfo: caller. > While there are plenty of owner information in page owner, > besides caller, it includes task id (pid), process id (tgid), > and other useful information, which enables us for more comprehensive > page allocation/release relevant statistics and analysis. > > Adding allocator infomation can augment page owner for tracking about > who allocates each page. And this patch adds vmalloc allocator infomation. Hm but page_owner has the whole stack trace of allocation so it should be easy to determine vmalloc from slab etc? How exactly would this extra field help?