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 BB31CE668A1 for ; Sun, 24 Nov 2024 06:26:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A29E56B0082; Sun, 24 Nov 2024 01:26:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E5476B0083; Sun, 24 Nov 2024 01:26:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C88F6B0085; Sun, 24 Nov 2024 01:26:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 6DDDC6B0082 for ; Sun, 24 Nov 2024 01:26:43 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B933641EBC for ; Sun, 24 Nov 2024 06:26:42 +0000 (UTC) X-FDA: 82820004960.09.1BF4453 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) by imf22.hostedemail.com (Postfix) with ESMTP id C2DFDC0002 for ; Sun, 24 Nov 2024 06:26:38 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Uwf+WcUE; spf=pass (imf22.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.173 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732429599; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Tqwfti3Gig5keHs1oaBRmyx5dx91X6ka+Wihml4zKdY=; b=L2s5QIdZXN7G4D9e1PF1+4cDoV9HBmH8OaQsGjuCoiraATUp7Awk3qziFPgkNZWqvOrMT4 e+buHNL1vamu9l1UiBCm6z4xx3+FeO/x5odonjPkIvuzbBLeG6Zuc0oRggAibZpy/VjCj/ l1/o7fbuUQxzupxRxitVwOMbOIQhIBY= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Uwf+WcUE; spf=pass (imf22.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.173 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732429599; a=rsa-sha256; cv=none; b=QyN7F9Ilv8DwL+GsBTyk4aDPjODoLk09AN6a7/TFP3jkuYQi9pMJq4ZOf6pPc7GR9JjAB4 sfQ2Js5R7U2707UYivUDlA6Z7On2ygPH5wXVo7Uk1L6qFMg8e2NjTafmjXtZviDDzm8MWr vakQAADZVsvWZ2IINrDSr8QJ+Pt4yZw= Date: Sat, 23 Nov 2024 22:26:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1732429598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tqwfti3Gig5keHs1oaBRmyx5dx91X6ka+Wihml4zKdY=; b=Uwf+WcUEC2Er69hyT7eqwu8RzNxIx8K8eAEdy3iLxohfghYpOY30mTJie8fxdGFf5G2Y/r K3LpmFbr/Sft5PI0C+yEPsgr0ADB8LAX2aGHiAIyRpQo61er1jP46EkAX8zKtuuPmSLgQp K4RTPYDNU9y4PSkF2PWSTqilYRKAb8c= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Vlastimil Babka Cc: Matthew Wilcox , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Axel Rasmussen , Steven Rostedt , Suren Baghdasaryan , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: Re: [PATCH] mm: mmap_lock: optimize mmap_lock tracepoints Message-ID: References: <20241123060939.169978-1-shakeel.butt@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C2DFDC0002 X-Stat-Signature: tyx5jc8uc15wtq6c6akp8u6mo3rf3yfw X-Rspam-User: X-HE-Tag: 1732429598-629960 X-HE-Meta: U2FsdGVkX1/QV7zFN6KMR+ah+dNEfBeDcNu9mzD94MkX/81B5CTNZy82gegnO9BE/RufejrU/HIwbQguiggIepPQ9h8vKZ2AJrWFJtl8ek9q2EhYTZ2FYB10TCpKBUtNT60kWZPCiHs8kbsx5nz5rj2gDVticfhyr+yqVHfMzyi8PvjDG14XLzwdugknkL+bdYoyaVvie4WYl+QZ9O4uS4Q8J5p7Mno68SESF8I5D4TAk/AZXVa/Ew/jNRhx89Sg9SZFPIGwLJgz7O1onUiwELu8TyTjKy2Ctczz2i496JzFtk5/4dGS97iHwO3QFBU8NNkiTWm0zmsu4VMXntkiz3wrUAMPLtM7f9rzcf1DE6OEMf/1DyDHNKebV1+3w+QKllgAr4cDcwzmQt1qEtjHxxLvx7Um53uVfEIbX+9V2V/0vYzfykI5VwnquLv8juLPbzphwtB1H5MOOYJQ51gnjm8Ak2NoTr3ilFwjS5Tlnc/zuQiPBkNyo0uSo8ghrfYsntEFT8KExu8m0mf5ANhxE5uWeYSA60ujl4oZAzUlCIGXZK5AnUjT/h9WoaupAkOh9NINJY1fBSKQhbT9Xa9IT0Okji4zqy/qWSSoOPIkkL/rK8z4CmiZLtxRhTY2sOOfpA2PwsYlTnwhXX2QXFjIfzvvfG4dWw2WAvG4xiJkqcIv05e3zfG5PH4rrwNJo8+FHqYs0oVha9H+AV7f+A2pl4FSdRzddBYpUTUcrBTEYpf08DurdlQfsd2ep4qRlFL+B/K8p2Eh9LbsbHLx4/DfSERjRd9ppk8C5ybPTr5EHkc7m+vGuBnsvePBv6HJ+Do1jzkwEcGN9y7qS66F1lfTnlN4wqr+6CnLYxA/jCOLpchNgQqmcvq1ujkIz8/qsa1snf52Ip+3DehZ8c6hK6eUFRPdvxEI5Pd5nimUuB6bjna+7YMFYZ5ex7f4lKpX7opKkZOZI56mewRbLUM/qUn MRLf+Xov RN/B5lBmg8IwsqlXuRsIa2E6ahu0yNOJ6pxL2FRgsa6FajErA8HfL/GPecqG6QiMo/9yr0fCKpf8IHqz7ukJr9ka1w6bRObW01ZGI+ajV4y/Udpv0VwS5dV+nbAQxA8n23/LgJMybUeBkx01HHDLjpdvbZGRI8P7xpPlUi1f7bJsZuGL/4BhcQnkHUMJIXjpB9KMT 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: List-Subscribe: List-Unsubscribe: On Sat, Nov 23, 2024 at 10:38:59PM +0100, Vlastimil Babka wrote: > On 11/23/24 22:35, Shakeel Butt wrote: > > On Sat, Nov 23, 2024 at 05:01:57PM +0000, Matthew Wilcox wrote: > >> On Fri, Nov 22, 2024 at 10:09:39PM -0800, Shakeel Butt wrote: > >> > TP_printk( > >> > - "mm=%p memcg_path=%s write=%s", > >> > - __entry->mm, > >> > - __get_str(memcg_path), > >> > + "mm=%p memcg_id=%llu write=%s", > >> > + __entry->mm, __entry->memcg_id, > >> > __entry->write ? "true" : "false" > >> > >> Is it actually useful to print out the (hashed) pointer of the mm? > >> Wouldn't the PID be more useful so you could actually associate it with > >> a task? > >> > > > > For our usecase i.e. bpftrace, we don't really care about these prints > > as we can directly access the arguments like mm in bpftrace. I wonder if > > others are using this hased pointer in some other way. I don't mind > > chaning it but I think that would be a separate patch. > > I wonder if it's actually hashed when trace events are obtained in binary > form, i.e. via trace-cmd. Might be hashed only when doing e.g. cat > trace_pipe as that's when the kernel's printk with its hashing is used? > > I guess that would be another argument for not using it in the tracepoint, > as it would be a sidechannel... Yup trace-cmd is showing the unhashed raw pointers for mm. If there is agreement, I can remove the printk of mm pointer in next version.