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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC9B7C433EF for ; Tue, 22 Mar 2022 15:10:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 788106B0071; Tue, 22 Mar 2022 11:10:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 736DA6B0072; Tue, 22 Mar 2022 11:10:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D7836B0074; Tue, 22 Mar 2022 11:10:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 4AF376B0071 for ; Tue, 22 Mar 2022 11:10:49 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1EF49245A3 for ; Tue, 22 Mar 2022 15:10:49 +0000 (UTC) X-FDA: 79272359418.11.C627BD6 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf04.hostedemail.com (Postfix) with ESMTP id 5C6B74002F for ; Tue, 22 Mar 2022 15:10:48 +0000 (UTC) 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 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=FoeJffCY; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=pRUTZLwz; dmarc=none; spf=pass (imf04.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 5C6B74002F X-Stat-Signature: ms8b117btxu3y5gqp1goturbmgeojy1b X-HE-Tag: 1647961848-310369 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?