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 0D912C433F5 for ; Thu, 3 Feb 2022 12:10:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E8078D0147; Thu, 3 Feb 2022 07:10:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 798478D0124; Thu, 3 Feb 2022 07:10:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 638878D0147; Thu, 3 Feb 2022 07:10:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 511A98D0124 for ; Thu, 3 Feb 2022 07:10:46 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0E1E7181A5285 for ; Thu, 3 Feb 2022 12:10:46 +0000 (UTC) X-FDA: 79101352092.08.B55BA57 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf19.hostedemail.com (Postfix) with ESMTP id 86B481A000E for ; Thu, 3 Feb 2022 12:10:45 +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-out1.suse.de (Postfix) with ESMTPS id 12B3821100; Thu, 3 Feb 2022 12:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1643890244; 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=osIhrdtOjjmkFFphcb83Nczt+7vGIRa7d6OObVoINEs=; b=VhapAhebHkYqVU+ErQEcL6KulK37k5BjSG1CLIDdCh/yTExSO04ZuZymV71zPilFsdgOfA wF2ZIVe+bnEC36RO81mRv65injO9CyFWPGm8vITJPbRh2wAkyrrqLKGNBjicMVuBQXTMT+ eB52FxaQGUmLUFtnHKdRV5Tx2v81Fyg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1643890244; 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=osIhrdtOjjmkFFphcb83Nczt+7vGIRa7d6OObVoINEs=; b=nnKKymePe6Gbn1kwuKkf/SJxV5DxbzCLpIFF/YkxH57g/HA2GqJLuip3Rn+iSZxEe0CZM6 Tqir+aIs1KACZyDA== 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 C178913BAD; Thu, 3 Feb 2022 12:10:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lDJtLkPG+2GBDgAAMHmgww (envelope-from ); Thu, 03 Feb 2022 12:10:43 +0000 Message-ID: <91fb8637-6550-dc37-a95b-df7812b02b0a@suse.cz> Date: Thu, 3 Feb 2022 13:10:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v4 4/4] mm/page_owner: Record task command name Content-Language: en-US To: Waiman Long , Michal Hocko Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Ira Weiny , Mike Rapoport , David Rientjes , Roman Gushchin , Rafael Aquini References: <20220131192308.608837-5-longman@redhat.com> <20220131220328.622162-1-longman@redhat.com> <4ba66abe-5c6d-26a7-f11c-c3b8514bfb34@redhat.com> From: Vlastimil Babka In-Reply-To: <4ba66abe-5c6d-26a7-f11c-c3b8514bfb34@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 86B481A000E X-Rspam-User: nil Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=VhapAheb; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=nnKKymeP; dmarc=none; spf=pass (imf19.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Stat-Signature: s6ejra96tomue3757szdpgasdycciktx X-Rspamd-Server: rspam08 X-HE-Tag: 1643890245-357089 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 2/2/22 17:53, Waiman Long wrote: > > On 2/1/22 10:28, Michal Hocko wrote: >> Cc Vlastimil >> >> On Mon 31-01-22 17:03:28, Waiman Long wrote: >>> The page_owner information currently includes the pid of the calling >>> task. That is useful as long as the task is still running. Otherwise, >>> the number is meaningless. To have more information about the allocating >>> tasks that had exited by the time the page_owner information is >>> retrieved, we need to store the command name of the task. >>> >>> Add a new comm field into page_owner structure to store the command name >>> and display it when the page_owner information is retrieved. >> I completely agree that pid is effectivelly useless (if not misleading) >> but is comm really telling all that much to compensate for the >> additional storage required for _each_ page in the system? > > Yes, it does add an extra 16 bytes per page overhead. The command name can > be useful if one want to find out which userspace command is responsible for > a problematic page allocation. Maybe we can remove pid from page_owner to > save 8 bytes as you also agree that this number is not that useful. Pid could be used to correlate command instances (not perfectly if reuse happens), but command name could have a higher chance to be useful. In my experience the most useful were the stacktraces and gfp/order etc. anyway. So I wouldn't be opposed replacing pid with comm. The mild size increase should be acceptable, this is an opt-in feature for debugging sessions with known tradeoff for memory and cpu overhead for the extra info. > Cheers, > Longman >