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=-14.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 9CA5CC432BE for ; Thu, 2 Sep 2021 08:00:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A0CF60F90 for ; Thu, 2 Sep 2021 08:00:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3A0CF60F90 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C54AA8D0002; Thu, 2 Sep 2021 04:00:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C03F18D0001; Thu, 2 Sep 2021 04:00:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF2F18D0002; Thu, 2 Sep 2021 04:00:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id A06648D0001 for ; Thu, 2 Sep 2021 04:00:06 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 47F908249980 for ; Thu, 2 Sep 2021 08:00:06 +0000 (UTC) X-FDA: 78541885212.30.9199C22 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf15.hostedemail.com (Postfix) with ESMTP id BAB37D00009D for ; Thu, 2 Sep 2021 08:00:05 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 B3953224A5; Thu, 2 Sep 2021 08:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1630569604; 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=wG5ludP/4gEC4SIqeHD4LJedSIA+YmEOtAhafiN+9Bc=; b=ljz7RDfQQWWZGl2/9ptgiitKdg3yYD5U31/Vmt3t2TM19StScduna3l6L+5HLZDLcy1gwt 2hyIlqAR3MsZXf5JYdZ9Z5tlmipu1kVbr7ed6aYymiRDkJr3WZCAEnIZgg1ko92vdMui+x a1+TBNnSCYge+Q0kZLuAJbrk75sIMfQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1630569604; 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=wG5ludP/4gEC4SIqeHD4LJedSIA+YmEOtAhafiN+9Bc=; b=wall8DtTRhiFL3sM/yMG4YyVJjGyqY362o5tkQlIroCT3FR0bLID1USPceriXe54lIryct go7i+GvcntJLvHAA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 96F6213A75; Thu, 2 Sep 2021 08:00:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id 2ZstJISEMGFDQgAAGKfGzw (envelope-from ); Thu, 02 Sep 2021 08:00:04 +0000 Message-ID: Date: Thu, 2 Sep 2021 10:00:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.3 Subject: Re: [RFC PATCH 2/2] lib, stackdepot: Add helper to print stack entries. Content-Language: en-US To: imran.f.khan@oracle.com, geert@linux-m68k.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, "linux-mm@kvack.org" , Alexander Potapenko References: <20210901051914.971603-1-imran.f.khan@oracle.com> <20210901051914.971603-3-imran.f.khan@oracle.com> <9527f084-4d60-2a85-f4e3-8e16cf7aad08@oracle.com> From: Vlastimil Babka In-Reply-To: <9527f084-4d60-2a85-f4e3-8e16cf7aad08@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BAB37D00009D Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ljz7RDfQ; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=wall8DtT; dmarc=none; spf=pass (imf15.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam01 X-Stat-Signature: b9x7m8dd4x5adwgdyjjbbr45nnk5p345 X-HE-Tag: 1630569605-695875 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 9/2/21 02:11, imran.f.khan@oracle.com wrote: > Hi Vlastimil, > > On 1/9/21 7:07 pm, Vlastimil Babka wrote: >> On 9/1/21 07:19, Imran Khan wrote: >>> To print a stack entries, users of stackdepot, first >>> use stack_depot_fetch to get a list of stack entries >>> and then use stack_trace_print to print this list. >>> Provide a helper in stackdepot to print stack entries >>> based on stackdepot handle. >>> >>> Signed-off-by: Imran Khan >>> Suggested-by: Vlastimil Babka >> >> You should convert existing users together with the patch that introduces >> the helper. I think print_stack() in mm/kasan/report.c, and >> __dump_page_owner() could use this. >> > > Okay. I have done this in v2 of the patch set. BTW I also see some users > (one place in page owner, rest all in some gpu drivers) of stack_depot_fetch > + stack_trace_snprintf. Could you please let me know if it would be okay to > add a helper corresponding to stack_trace_snprintf as well. Yeah looks like that would make sense too, i915 even has this as __print_depot_stack(). Thanks.