Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1007063lqt; Fri, 7 Jun 2024 05:41:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW5WNdarCpYShUArZdMHd1bW8pOkikC0WX9P1n4gjcW5t9c8CoSa98r2fJbT6dE+Zgh5pIPDxgqlUVYBj2MzFHDCTxiqNsNCqzn1Tq3fQ== X-Google-Smtp-Source: AGHT+IFEEndRgkjv9a5HVTIF50f8k5Gw1OUDwRiLuO8C+UcxDzFQJSIzMqEom+EIfVVNFeZB0o6e X-Received: by 2002:a05:6870:ae81:b0:251:27ae:7569 with SMTP id 586e51a60fabf-254644503d8mr2581885fac.5.1717764089636; Fri, 07 Jun 2024 05:41:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717764089; cv=pass; d=google.com; s=arc-20160816; b=lnx8NDYrIuFyRxpFDv7fFtR/vss4MXQT0vsnXrZeCsU2oounVbXPz4+3k2sKlLJY9t gyMuqZeV/XJKopnSZDc+V3eQMBEs2V1Mr6T5O9WMNWDsrjbM9WmFofe5E6XEs//T2aVO paT8Y8MnfvPPNyMvmUdkT0DJ0Kaf+I6euxCsj3q5N2eTubs4HPyjLKvcEA4ZCA8GAq9q qFViEl/cc6mohPsyMzPbIzUbsAEBqDMA29sxsXzd+jRidBn3FcKig5HheuTdgQeie4Hf O0WNyvIiz+p5TluyWFsk8YyHqlyA2t7CE+RJHZzjENpKS6YX3LGE9qhgHc9BmU9oDNiO eFBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=N0t9qQNDQyMfGhvDGBq4R0rinqRtCXO9/OSll4uI/+M=; fh=fiW4LigVjRY5tnesdoaA8y1F3f/t2QD0G8NTqRzkMfU=; b=Ge8RV31wwgGEi/akw6tFSaGtkiapLytjYOzgYnBwzIENGGR+U9OtYrQEfqgLjXEQuO ATKOckr6ZXK0tBJaga51TdH85CisGDAR/xcsp1womUlgYcKsFzi/PgbbXsIvO6oM/VWs DSbSqW74qpEasNYlZGSGstQ3WvfFpUFDqNLLqBXcMQ2LMTdhoV/RPum3QYTR5o8Y53N/ KgCXBtPKJIK4zERa0gXEW8pz1jUkRv0gFfIYt79Q3wD09l7jMuSazuT5hDcnOfmz59fG jJ8R90Q/A5fwmvaIJ4xgO7oP+/SJMpBVMzntjXgYqmLneZVo5hiyXhIZoPzhzDwJGk/8 0wxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mtQAu4d4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2073c4fdsi3011037a12.81.2024.06.07.05.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:41:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mtQAu4d4; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E54BDB227C7 for ; Fri, 7 Jun 2024 12:32:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F108E194124; Fri, 7 Jun 2024 12:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mtQAu4d4" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9351850B7; Fri, 7 Jun 2024 12:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717763469; cv=none; b=ihspyxSIkcpuqeAjV+svjm+SkQD9qNXYX9PJkfxVmIC+UWD9oys+w1j7+dWZavBsOxIpzshgJ1BxvcNHI+y5XEG+wifOv3T+MwunJVuYIR75/9556gnf6zzfP3iw3ZCl1jkiNxN4VHU3Vzta36xYVqPpyS+opBRpz8S0aJdNnn4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717763469; c=relaxed/simple; bh=RuDIhSbO/ax8zNd2ran6Gzbl4un6OLukSdQSWrPKP5s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a/zTJTJicgj4W/5Q/iphzeMeSZekEl003bNzHzMCLNpIAo9mkXFcy4U63VjHZcE2g6FeSklUFNyJ9VKakOtL/876BMoGTs9R2hljDJPqzv/KIZYijP6ntyTlyTbP/Msj6wEdANSSnEyY6qJZWOuUQj8kbICpjfv9/nba0aUBYC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mtQAu4d4; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-57a4ce82f30so2517618a12.0; Fri, 07 Jun 2024 05:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717763466; x=1718368266; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=N0t9qQNDQyMfGhvDGBq4R0rinqRtCXO9/OSll4uI/+M=; b=mtQAu4d4XlKrMSJMuzE18hRv2rGbyDiD8PeDYFQlpjxKEyese7Q53wrKH5y7oUV0Vr 28Qp+AbcRgTV1Aj01fBvOek2LMZJJq+L1zIi+bVehdV1sc7kg/D3jeO5vx9U+4RPtgdj yG5aQ4H8tE0lj9y4eoETprXJN5qaDbqIzTTuND1LdErfoZ7rBxqdXznx2oJ2T8QSIVy8 FtxPTyaQAF56ka1alhP2g8ln+GjH9WO/SAwT9RiEjJfjKjAQcNVLgGeujJ2EDs6C6vq2 ACzakRjCQ1ieHSg76vaxICyfybb0GzAyUmjCS3hazrsU6dcFucLDCGTE82AUtwFRdkjl DhPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717763466; x=1718368266; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N0t9qQNDQyMfGhvDGBq4R0rinqRtCXO9/OSll4uI/+M=; b=rVPli6S6EASMiI6mheun6Fu7IdqWS0g86MxC91RVtpvRtYzd0Ym6bXyXJdopMh/G9P 5YJ+6trasR1YR3mn+L32bD0RRjdqNIH6P0SYFA3WQtWR2d8DnYDGFQuYnPX9fbOwWS+h Cr3WRu5Mognrwpf7qksd4cqnQ6S0B0Kxa0z83Z4p8mGLRMot/IXxo74XMOeovzpl+YeU MBNdf8PyF6haaXaKF3sNI9bNM1bpem+TYKQ49voCMbNNqFiVhwQ+lSGmdHn4692gQXYi eue+2+OfiQ2WAyD95yeAiaXm3WT2GKyxaFSm0a5G2PE1O+MjQ92W2zdn4Ao8hFuKVIHf 4dHQ== X-Forwarded-Encrypted: i=1; AJvYcCVUbzO0U9d0UxOjnBfIPvPW7Gdcbi5u0nij75sNJ5L4YyKV4sZgQGtHUeq66OaVOZa7o364L06hUFtvNsDFqd0vxSeLvmGOLo1MtNJTJ+7frSgpJW+i1+DS2na40+SehZOM37Mr0BiTz2FI9uZmKYRKTrBuYpgKhvqNwzvPBPnSE3kObE9hkFuLR2O9iTHySWC5pRHbhRvGESefDVs7oDwA30CdzphslEQ4djsZhDgKJ5Vns1ub9j68emOaQ6vR2havGFxd47HE5RbX8Tb3uC7C/CBW+2uiluVSaAhN8X6aCdj6sWrgqc18IhKFqOqYfx568thGB7uzkCvq3w6PSfuO/UrNtSX1OsAGWXr7V1S5Io+3nSWIfe5xXbJ47OUj0IuzqLa9Wn0EG8belrI7GHf8Sm1JjBcerIXKq7aHDqyzobGQz3oqz44ztxZ7Oe2GXxjq2aOFSecydfh5NrIpinOkmti1IUiuB051L4p+gA== X-Gm-Message-State: AOJu0YxgtfnolRWsE5AWPrSQtME2r7j+voX3VOENYEATnhwPyfy2SeV9 Mwgz4ifZaW31IES/mqKYgPTqjiMbshWU1djPEoUeIvXtVuWN1bp7 X-Received: by 2002:a50:c181:0:b0:57c:5ec9:f5d9 with SMTP id 4fb4d7f45d1cf-57c5eca001emr1193325a12.31.1717763466203; Fri, 07 Jun 2024 05:31:06 -0700 (PDT) Received: from [192.168.42.93] ([163.114.131.193]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aadf9d8d0sm2682019a12.8.2024.06.07.05.31.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jun 2024 05:31:05 -0700 (PDT) Message-ID: Date: Fri, 7 Jun 2024 13:31:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v10 06/14] page_pool: convert to use netmem To: Steven Rostedt , Mina Almasry Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Donald Hunter , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , linux-mm@kvack.org, Matthew Wilcox References: <20240530201616.1316526-1-almasrymina@google.com> <20240530201616.1316526-7-almasrymina@google.com> <20240605214837.44efcc6f@gandalf.local.home> Content-Language: en-US From: Pavel Begunkov In-Reply-To: <20240605214837.44efcc6f@gandalf.local.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/6/24 02:48, Steven Rostedt wrote: > On Thu, 30 May 2024 20:16:05 +0000 > Mina Almasry wrote: > >> @@ -42,51 +42,52 @@ TRACE_EVENT(page_pool_release, >> TRACE_EVENT(page_pool_state_release, >> >> TP_PROTO(const struct page_pool *pool, >> - const struct page *page, u32 release), >> + netmem_ref netmem, u32 release), >> >> - TP_ARGS(pool, page, release), >> + TP_ARGS(pool, netmem, release), >> >> TP_STRUCT__entry( >> __field(const struct page_pool *, pool) >> - __field(const struct page *, page) >> + __field(netmem_ref, netmem) > > Why make this of type "netmem_ref" and not just "unsigned long"? > >> __field(u32, release) >> __field(unsigned long, pfn) >> ), >> >> TP_fast_assign( >> __entry->pool = pool; >> - __entry->page = page; >> + __entry->netmem = netmem; > > You could have this be: > > __entry->netmem = (__force unsigned long)netmem; > >> __entry->release = release; >> - __entry->pfn = page_to_pfn(page); >> + __entry->pfn = netmem_to_pfn(netmem); >> ), >> >> - TP_printk("page_pool=%p page=%p pfn=0x%lx release=%u", >> - __entry->pool, __entry->page, __entry->pfn, __entry->release) >> + TP_printk("page_pool=%p netmem=%lu pfn=0x%lx release=%u", >> + __entry->pool, (__force unsigned long)__entry->netmem, > > And not have to expose the above text to user space (look at the format > file it produces). > > It being of type "netmem_ref" in the ring buffer is useless. netmem is a pointer with one bit serving as a flag, considering mangling it might be better to %p it and perhaps also print its type (page* vs iov) separately. -- Pavel Begunkov